diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-11-23 14:53:10 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-11-23 14:53:10 -0200 |
commit | 05a9b8cad8b001b6a20fce73896cb378de20fcff (patch) | |
tree | b4df55463f1747144ddf20d3517429ad1f6df609 | |
parent | 1d61d06dc937e696452f0f8b8a6f9be7ed95a70e (diff) | |
parent | 75f74ae6dfb413f4a4c2549124b36f1f85357ab4 (diff) | |
download | puppet-drupal-05a9b8cad8b001b6a20fce73896cb378de20fcff.tar.gz puppet-drupal-05a9b8cad8b001b6a20fce73896cb378de20fcff.tar.bz2 |
Merge branch 'feature/drush' into develop
-rw-r--r-- | manifests/init.pp | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 9d71ecf..11a58f0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,12 +4,12 @@ class drupal( $www_folder = hiera('drupal::www_folder', '/var/www/data') ) { # We use drupal source from upstream - package { "drupal6": + package { [ "drupal6", "drush" ]: ensure => absent, } # Needed packages - package { [ "drush", "php5-gd", "php5-imagick" ]: + package { [ "php5-gd", "php5-imagick" ]: ensure => installed, } @@ -150,4 +150,43 @@ class drupal( force => true, backup => false, } + + # Composer + exec { 'getcomposer': + command => '/usr/bin/curl -sS https://getcomposer.org/installer | /usr/bin/php && /bin/mv composer.phar /usr/local/bin/composer', + user => 'root', + cwd => '/tmp', + creates => '/usr/local/bin/composer', + } + + #vcsrepo { "/usr/local/share/drush": + # ensure => present, + # provider => git, + # source => 'https://github.com/drush-ops/drush', + # revision => '401f034c59b031221d900bec7c2ba81d1331c284', + # owner => 'root', + # group => 'root', + #} + + #file { "/usr/local/bin/drush": + # ensure => '/usr/local/share/drush/drush', + # owner => root, + # group => root, + # require => [ Vcsrepo['/usr/local/share/drush'], Exec['getcomposer'] ], + #} + + #exec { 'composer-drush': + # command => '/usr/local/bin/composer global require drush/drush:dev-master', + # user => 'vagrant', + # creates => '/home/vagrant/composer/vendor/bin/drush', + # environment => [ 'COMPOSER_HOME="/vagrant"' ], + # require => Exec['getcomposer'], + #} + + exec { 'getdrush': + command => '/usr/bin/wget https://github.com/drush-ops/drush/releases/download/8.0.0/drush.phar -O /usr/local/bin/drush && chmod +x /usr/local/bin/drush', + user => 'root', + cwd => '/tmp', + creates => '/usr/local/bin/drush', + } } |