#
# Class for a Drupal development website using drupal-composer
#
class nodo::role::dev::drupal::composer(
$project = 'drupal',
$project_folder = '/srv/shared', # '/vagrant', '/srv/kvmx'
$project_user = 'user', # 'vagrant'
$db_name = 'drupal',
$db_password = 'hackme',
) {
include nodo::role::dev::drupal::composer::base
# Do not use this password on production machines
database::instance { $db_name:
password => $db_password,
}
apache::site { "${project}":
ensure => present,
docroot => "${project_folder}/web",
server_alias => "localhost ${project} ${project}.localhost ${project}.local",
mpm_user => $project_user,
mpm_group => $project_user,
manage_user => false,
manage_docroot => false,
custom_directives => "
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Require all granted
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Require all granted
",
}
#file { [ "${project_folder}/web/sites", "${project_folder}/web/sites/default" ]:
# ensure => directory,
# owner => root,
# group => root,
# mode => '0755',
# force => true,
#}
#file { "${project_folder}/web/sites/default/settings.local.php":
# ensure => present,
# owner => root,
# group => root,
# force => true,
# require => File["${project_folder}/web/sites/default"],
#}
}