From f453dff7373b4d217e1081201300b09211e9bfbf Mon Sep 17 00:00:00 2001 From: Marton Kiss Date: Mon, 21 Mar 2016 12:36:41 +0100 Subject: [PATCH] Refactor drush deployment As the Pear Drush deployment model is deprecated now, the Drupal puppet will use the standard puppet-drupal module for drush cli installation. Change-Id: I9d6afacc3ca9241bf1419102be01d44409ded8da Depends-On: I71e4356d0b6861dd648d069d5e31f002b3b0cc83 --- manifests/drush.pp | 17 ++++++----------- manifests/init.pp | 3 +-- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/manifests/drush.pp b/manifests/drush.pp index fcd65c5..c9b65c8 100644 --- a/manifests/drush.pp +++ b/manifests/drush.pp @@ -27,21 +27,16 @@ define drupal::drush ( $download_dir = '/srv/downloads', ) { - # pear / drush cli tool - pear::package { 'PEAR': } - pear::package { 'Console_Table': } - pear::package { 'drush': - version => '6.0.0', - repository => 'pear.drush.org', - require => [ Pear::Package['PEAR'], Pear::Package['Console_Table'] ], + class {'::drush::git::drush': + git_branch => '6.x', } - file { '/usr/share/php/drush/commands/dsd': + file { '/usr/share/drush/commands/dsd': ensure => directory, owner => 'root', group => 'root', mode => '0755', - require => [ Pear::Package['drush'] ] + require => Class['::drush::git::drush'], } # If we don't already have the specified dsd tar, download it. @@ -65,11 +60,11 @@ define drupal::drush ( # If drush-dsd just created extract to /etc/drush exec { 'drush-dsd-initial-init': user => 'root', - command => "/bin/tar -C /usr/share/php/drush/commands/dsd --strip 1 -xzvf ${download_dir}/drush-dsd.tar.gz;/usr/bin/drush cc all", + command => "/bin/tar -C /usr/share/drush/commands/dsd --strip 1 -xzvf ${download_dir}/drush-dsd.tar.gz;/usr/bin/drush cc all", subscribe => File["${download_dir}/drush-dsd.tar.gz"], refreshonly => true, logoutput => true, - require => File['/usr/share/php/drush/commands/dsd'], + require => File['/usr/share/drush/commands/dsd'], } } diff --git a/manifests/init.pp b/manifests/init.pp index bb7ff69..92ea8e4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -90,7 +90,6 @@ class drupal ( $conf_openid_provider = undef, ) { include ::httpd - include ::pear if $site_root == undef { $_site_root = "${site_vhost_root}/${site_name}" @@ -201,7 +200,7 @@ class drupal ( } # setup drush and drush-dsd extension - drush { 'drush': + ::drupal::drush { 'drush': require => File['/srv/downloads'], }