]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Install drush from git repo
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 23 Nov 2015 14:33:25 +0000 (12:33 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 23 Nov 2015 14:33:25 +0000 (12:33 -0200)
manifests/init.pp

index 9d71ecfd41e77c3e7937d296c35419f796ce94fe..20e08c13adbd71193c80c0d9503a596a5107c91f 100644 (file)
@@ -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,20 @@ class drupal(
     force   => true,
     backup  => false,
   }
+
+  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 => Vcrepo['/usr/local/share/drush'],
+  }
 }