aboutsummaryrefslogtreecommitdiff
path: root/manifests/role/dev/drupal8/base.pp
blob: 1c823876114f064804a388e3f096772d437e63ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# Base Class for a Drupal 8 development website
#
class nodo::role::dev::drupal8::base {
  include nodo::role::dev::virtual
  include apache
  include nodo::utils::development::web
  include nodo::utils::development::php

  class { 'php':
    series         => [ '7' ],
    manage_mod_php => '7',
  }

  $php_version = $::php::params::version7

  include database
  include drupal
  include php::composer

  # In case you want to use sqlite3 db
  package { 'sqlite3':
    ensure => installed,
  }

  # In case you use makefiles
  package { 'make':
    ensure => present,
  }

  # Xdebug config
  # https://www.drupal.org/node/2488300
  #file { '/etc/php5/apache2/conf.d/20-xdebug-levels.ini':
  #file { '/etc/php/5.6/apache2/conf.d/20-xdebug-levels.ini':
  #file { '/etc/php/7.0/apache2/conf.d/20-xdebug-levels.ini':
  file { "/etc/php/${php_version}/apache2/conf.d/20-xdebug-levels.ini":
    ensure  => present,
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => "[xdebug]\nxdebug.max_nesting_level=256\n",
    require => Package['php'],
    notify  => Service['apache2'],
  }

  # Fix previous typo error
  file { [ '/etc/php/7.2/mods-available/20-xdebug-levels.ini' ]:
    ensure => absent,
  }

  #file { "/etc/php/${php_version}/apache2/conf.d/20-max-execution-time.ini":
  #  ensure  => present,
  #  owner   => 'root',
  #  group   => 'root',
  #  mode    => '0644',
  #  content => "max_execution_time=120\n",
  #  require => Package['php'],
  #  notify  => Service['apache2'],
  #}

  #file { "/etc/php/${php_version}/apache2/conf.d/20-memory-limit.ini":
  #  ensure  => present,
  #  owner   => 'root',
  #  group   => 'root',
  #  mode    => '0644',
  #  content => "memory_limit=512M\n",
  #  require => Package['php'],
  #  notify  => Service['apache2'],
  #}

  #apache::site { [ "localhost", "default", "000-default" ]:
  apache::site { "localhost":
    ensure => absent,
  }
}