class drupal { include php::composer include drupal::drush include drupal::makefiles include drupal::maintenance group { 'drupal': ensure => present, allowdupe => false, } user { 'drupal': ensure => present, allowdupe => false, shell => '/bin/bash', gid => 'drupal', home => '/var/lib/drupal', require => Group['drupal'], } # This shall hold drush-backups in the future file { '/var/lib/drupal': ensure => directory, owner => 'drupal', group => 'drupal', mode => '0750', require => User['drupal'], } # TODO: old location, remove in the future file { "/usr/local/sbin/drupal": ensure => absent, } # Drupal management script file { "/usr/local/bin/drupal": ensure => present, source => 'puppet:///modules/drupal/drupal', owner => root, group => root, mode => '755', } # Drupal shared folder file { "/usr/local/share/drupal": ensure => directory, owner => root, group => root, mode => '755', } # See https://drupal.org/SA-CORE-2013-003 #file { "/tmp/.htaccess": # ensure => present, # owner => root, # group => root, # mode => '644', # source => "puppet:///modules/drupal/htaccess", #} # Ensure there's no old, buggy code in drupal farms file { [ '/var/www/data/drupal-6/backup', '/var/www/data/drupal-7/backup' ]: ensure => absent, recurse => true, force => true, backup => false, } # Ensure we have an 9.x instance exec { 'drupal-download-9.x': command => '/usr/local/bin/drupal download 9', user => "root", creates => '/var/www/data/drupal-9', require => File['/usr/local/bin/drupal'], } # Ensure we have an 8.x instance exec { 'drupal-download-8.x': command => '/usr/local/bin/drupal download 8', user => "root", creates => '/var/www/data/drupal-8', require => File['/usr/local/bin/drupal'], } # Ensure we have an 7.x instance exec { 'drupal-download-7.x': command => '/usr/local/bin/drupal download 7', user => "root", creates => '/var/www/data/drupal-7', require => File['/usr/local/bin/drupal'], } }