Install Drush with Puppet

While working on creating Vagrant profile for one of our projects that requires CentOS I have found out that most of puppet drush recepies use drush debian package that of course is not available on CentOS.

The workaround is to use https://drupal.org/project/puppet-drush. The snippets are:

In Puppetfile (I am using http://librarian-puppet.com/)

mod 'drush', :git => 'git://git.drupal.org/project/puppet-drush.git'

In your manifest file:

$drush_dev_build = true
class { 'drush': }

It is very important to set $drush_dev_build variable to true. Otherwise puppet will try to install drush from package that is not desired.