diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-07-28 15:19:10 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-07-28 15:19:10 -0300 |
commit | d4f4c68ae93af68b802c0e7d0f9c1749a6ae8646 (patch) | |
tree | 60bbc21d879ec4452383c98df7a1a970c9b1e5f5 /manifests/role/dev | |
parent | c31c7a3f57231c17c7f25da93ace9c3e96ad82b1 (diff) | |
download | puppet-nodo-d4f4c68ae93af68b802c0e7d0f9c1749a6ae8646.tar.gz puppet-nodo-d4f4c68ae93af68b802c0e7d0f9c1749a6ae8646.tar.bz2 |
Replace drupal8::composer and drupal9::composer by a single drupal::composer
Diffstat (limited to 'manifests/role/dev')
-rw-r--r-- | manifests/role/dev/drupal/composer.pp (renamed from manifests/role/dev/drupal8/composer.pp) | 6 | ||||
-rw-r--r-- | manifests/role/dev/drupal/composer/base.pp (renamed from manifests/role/dev/drupal9/base.pp) | 4 | ||||
-rw-r--r-- | manifests/role/dev/drupal9.pp | 142 | ||||
-rw-r--r-- | manifests/role/dev/drupal9/composer.pp | 49 |
4 files changed, 5 insertions, 196 deletions
diff --git a/manifests/role/dev/drupal8/composer.pp b/manifests/role/dev/drupal/composer.pp index cd25066..cb81380 100644 --- a/manifests/role/dev/drupal8/composer.pp +++ b/manifests/role/dev/drupal/composer.pp @@ -1,14 +1,14 @@ # -# Class for a Drupal 8 development website using drupal-composer +# Class for a Drupal development website using drupal-composer # -class nodo::role::dev::drupal8::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::drupal8::base + include nodo::role::dev::drupal::composer::base # Do not use this password on production machines database::instance { $db_name: diff --git a/manifests/role/dev/drupal9/base.pp b/manifests/role/dev/drupal/composer/base.pp index 74d1775..986ed17 100644 --- a/manifests/role/dev/drupal9/base.pp +++ b/manifests/role/dev/drupal/composer/base.pp @@ -1,7 +1,7 @@ # -# Base Class for a Drupal 9 development website +# Base Class for a Drupal development website using Composer # -class nodo::role::dev::drupal9::base { +class nodo::role::dev::drupal::composer::base { include nodo::role::dev::virtual include apache include nodo::utils::development::web diff --git a/manifests/role/dev/drupal9.pp b/manifests/role/dev/drupal9.pp deleted file mode 100644 index ca26101..0000000 --- a/manifests/role/dev/drupal9.pp +++ /dev/null @@ -1,142 +0,0 @@ -# -# Class for a Drupal 9 development website -# -class nodo::role::dev::drupal9( - $project = 'drupal', - $project_folder = '/srv/shared', # '/vagrant', '/srv/kvmx' - $project_user = 'user', # 'vagrant' - $db_name = 'drupal', - $db_password = 'hackme', -) { - include nodo::role::dev::drupal9::base - - # Do not use this password on production machines - database::instance { $db_name: - password => $db_password, - } - - # We could simply using one symlink, but it might incur in - # performance penalties by drush recursivelly searching for - # plugins in the whole project tree. - #file { "${::apache::www_folder}/drupal-9/sites/default": - # ensure => $project_folder, - # force => true, - #} - - #file { "${::apache::www_folder}/drupal-9/sites/${project}": - # ensure => $project_folder, - # force => true, - #} - - file { "${::apache::www_folder}/drupal-9/sites/default": - ensure => directory, - owner => root, - group => root, - mode => '0755', - require => Exec['drupal-download-9.x'], - force => true, - } - - file { "${::apache::www_folder}/drupal-9/sites/${project}": - ensure => "${::apache::www_folder}/drupal-9/sites/default", - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${::apache::www_folder}/drupal-9/sites/default/settings.php": - ensure => "${project_folder}/settings.php", - owner => root, - group => root, - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${::apache::www_folder}/drupal-9/sites/default/settings.local.php": - ensure => "${project_folder}/settings.local.php", - owner => root, - group => root, - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${::apache::www_folder}/drupal-9/sites/default/services.yml": - ensure => "${project_folder}/services.yml", - owner => root, - group => root, - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${::apache::www_folder}/drupal-9/sites/default/files": - ensure => "${project_folder}/files", - owner => root, - group => root, - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${::apache::www_folder}/drupal-9/sites/default/config": - ensure => "${project_folder}/config", - owner => root, - group => root, - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${::apache::www_folder}/drupal-9/sites/default/themes": - ensure => "${project_folder}/themes", - owner => root, - group => root, - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${::apache::www_folder}/drupal-9/sites/default/modules": - ensure => "${project_folder}/modules", - owner => root, - group => root, - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${::apache::www_folder}/drupal-9/sites/default/libraries": - ensure => "${project_folder}/libraries", - owner => root, - group => root, - force => true, - require => File["${::apache::www_folder}/drupal-9/sites/default"], - } - - file { "${project_folder}": - ensure => directory, - owner => $project_user, - group => $project_user, - mode => '0755', - } - - file { "${project_folder}/vendor": - ensure => directory, - owner => $project_user, - group => $project_user, - mode => '0755', - require => File["${project_folder}"], - } - - # Symlink to aid development - file { "${project_folder}/vendor/drupal-9": - ensure => "${::apache::www_folder}/drupal-9", - require => File["${project_folder}/vendor"], - } - - apache::site { "${project}": - ensure => present, - docroot => "${::apache::www_folder}/drupal-9", - server_alias => "localhost ${project} ${project}.localhost ${project}.local", - mpm_user => $project_user, - mpm_group => $project_user, - manage_user => false, - manage_docroot => false, - use => [ 'Drupal 9' ], - require => Exec['drupal-download-9.x'], - } -} diff --git a/manifests/role/dev/drupal9/composer.pp b/manifests/role/dev/drupal9/composer.pp deleted file mode 100644 index c705f6b..0000000 --- a/manifests/role/dev/drupal9/composer.pp +++ /dev/null @@ -1,49 +0,0 @@ -# -# Class for a Drupal 9 development website using drupal-composer -# -class nodo::role::dev::drupal9::composer( - $project = 'drupal', - $project_folder = '/srv/shared', # '/vagrant', '/srv/kvmx' - $project_user = 'user', # 'vagrant' - $db_name = 'drupal', - $db_password = 'hackme', -) { - include nodo::role::dev::drupal9::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 => " - <Directory ${project_folder}/web> - Options Indexes Includes FollowSymLinks MultiViews - AllowOverride All - Require all granted - </Directory>", - } - - 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"], - #} -} |