]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Installs composer
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 23 Nov 2015 16:27:04 +0000 (14:27 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 23 Nov 2015 16:27:04 +0000 (14:27 -0200)
manifests/init.pp

index 4fcd34117d7012a4bd3b3ca8a1a27200f61a971f..b82ec0cc0ca85b2ec53ae0e83fa63a7a475ba5bd 100644 (file)
@@ -160,10 +160,34 @@ class drupal(
     group    => 'root',
   }
 
+  # 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',
+    require => Package['curl'],
+  }
+
   file { "/usr/local/bin/drush":
     ensure  => '/usr/local/share/drush/drush',
     owner   => root,
     group   => root,
-    require => Vcsrepo['/usr/local/share/drush'],
-  }
+    require => [ Vcsrepo['/usr/local/share/drush'], Exec['getcomposer'] ],
+  }
+
+  #exec { 'getdrush':
+  #  command => '/usr/bin/wget https://github.com/drush-ops/drush/releases/download/8.0.0-rc3/drush.phar -O /usr/local/bin/drush && chmod +x /usr/local/bin/drush',
+  #  user    => 'root',
+  #  cwd     => '/tmp',
+  #  creates => '/usr/local/bin/drush',
+  #}
+
+  #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'],
+  #}
 }