diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-12-16 10:00:55 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-12-16 10:00:55 -0200 |
commit | 951ef21d7bcadcf7fcbc5d3718d0ff16869d0660 (patch) | |
tree | 870d06599c9164024c85f300f97cc0cc54d63a41 /manifests/drush.pp | |
parent | b371c43c3ea02d449d22f6cbc36ea48a06ae1e41 (diff) | |
download | puppet-drupal-951ef21d7bcadcf7fcbc5d3718d0ff16869d0660.tar.gz puppet-drupal-951ef21d7bcadcf7fcbc5d3718d0ff16869d0660.tar.bz2 |
Split into smaller classes
Diffstat (limited to 'manifests/drush.pp')
-rw-r--r-- | manifests/drush.pp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/manifests/drush.pp b/manifests/drush.pp new file mode 100644 index 0000000..4a9b27f --- /dev/null +++ b/manifests/drush.pp @@ -0,0 +1,58 @@ +class drupal::drush( + $version = hiera('drupal::drush::version', '8.0.1') +) { + # Drush config folder + file { '/etc/drush': + ensure => directory, + owner => root, + group => root, + mode => 0644, + } + + # Drush default configuration + file { '/etc/drush/drushrc.php': + ensure => present, + owner => root, + group => root, + mode => 0644, + source => 'puppet:///modules/drupal/drushrc.php', + require => File['/etc/drush'], + } + + # TODO: future + package { 'drush': + ensure => absent, + } + + #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/${version}/drush.phar -O /usr/local/bin/drush && chmod +x /usr/local/bin/drush", + user => 'root', + cwd => '/tmp', + timeout => 0, + creates => '/usr/local/bin/drush', + } +} |