aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-11-23 14:53:10 -0200
committerSilvio Rhatto <rhatto@riseup.net>2015-11-23 14:53:10 -0200
commit05a9b8cad8b001b6a20fce73896cb378de20fcff (patch)
treeb4df55463f1747144ddf20d3517429ad1f6df609
parent1d61d06dc937e696452f0f8b8a6f9be7ed95a70e (diff)
parent75f74ae6dfb413f4a4c2549124b36f1f85357ab4 (diff)
downloadpuppet-drupal-05a9b8cad8b001b6a20fce73896cb378de20fcff.tar.gz
puppet-drupal-05a9b8cad8b001b6a20fce73896cb378de20fcff.tar.bz2
Merge branch 'feature/drush' into develop
-rw-r--r--manifests/init.pp43
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',
+ }
}