diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-07-28 10:52:53 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-07-28 10:52:53 -0300 |
commit | 88fb5d18e243f11757b93566ac224cee6b27041d (patch) | |
tree | 9ba48d3b6439b5956aec4deed93c15ac093b9235 /manifests | |
parent | 7bc0becc46c377010ab32a794fdba68e214aefd5 (diff) | |
download | puppet-drupal-88fb5d18e243f11757b93566ac224cee6b27041d.tar.gz puppet-drupal-88fb5d18e243f11757b93566ac224cee6b27041d.tar.bz2 |
Can choose between legacy drush or drush launcher
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/drush.pp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/manifests/drush.pp b/manifests/drush.pp index 927b168..f7ef791 100644 --- a/manifests/drush.pp +++ b/manifests/drush.pp @@ -1,5 +1,6 @@ class drupal::drush( - $version = lookup('drupal::drush::version', undef, undef, '8.1.18') + $launcher = false, + $version = lookup('drupal::drush::version', undef, undef, '8.3.5') ) { # Drush config folder file { '/etc/drush': @@ -19,7 +20,6 @@ class drupal::drush( require => File['/etc/drush'], } - # TODO: future package { 'drush': ensure => absent, } @@ -48,9 +48,14 @@ class drupal::drush( # require => Exec['getcomposer'], #} + $download_url = $launcher ? { + true => "https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar", + false => "https://github.com/drush-ops/drush/releases/download/${version}/drush.phar", + } + exec { 'getdrush': #command => "/usr/bin/wget https://github.com/drush-ops/drush-launcher/releases/download/${version}/drush.phar -O /usr/local/bin/drush && chmod +x /usr/local/bin/drush", - 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", + command => "/usr/bin/wget ${download_url} -O /usr/local/bin/drush && chmod +x /usr/local/bin/drush", user => 'root', cwd => '/tmp', timeout => 0, |