--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dev/provisioning/modules/sysconfig/manifests/drupal.pp Tue Oct 18 14:38:56 2016 +0200
@@ -0,0 +1,37 @@
+class sysconfig::drupal (
+ $vhost = hiera('sysconfig::params::vhost', $sysconfig::params::vhost)
+) inherits sysconfig::params {
+
+ notify {'drupal': name => "drupal => \$vhost : ${vhost}", withpath => true }
+
+ #install composer
+ file { "/tmp/composer":
+ ensure => directory,
+ }->
+ file { "/tmp/composer/install.sh":
+ mode => "0755",
+ source => "puppet:///modules/sysconfig/composer/install.sh",
+ }->
+ exec { "install_composer":
+ command => "/tmp/composer/install.sh",
+ creates => "/usr/local/bin/composer"
+ }->
+
+ class { '::drush':
+ require => Package["php56"],
+ versions => ['7'],
+ default_version => '7',
+ autoupdate => true,
+ ensure_extra_packages => false,
+ extra_packages => [ 'bzip2', 'gzip', 'less', 'mariadb', 'rsync', 'unzip', 'wget' ],
+ extensions => ['drush_extras'],
+ php_path => '/opt/remi/php56/root/usr/bin/php',
+ composer_path => '/opt/remi/php56/root/usr/bin/php /usr/local/bin/composer'
+ }
+
+ drush::alias { 'corpus':
+ root => '/var/www/corpusdelaparole/drupal',
+ uri => $vhost,
+ }
+
+}