Skip to content
Drush chef cookbook
Ruby Shell
Find file
New pull request
Latest commit b9044b1 @walkah walkah Merge pull request #37 from alex-slynko-wonga/test_kitchen_for_ubuntu…

Test kitchen block for Ubuntu 14.04
Failed to load latest commit information.
attributes Add variable console table version.
providers execute provider, readrme update
recipes Add variable console table version.
resources execute provider, readrme update
.gitignore Fix #11 - add test-kitchen support
.kitchen.yml Test kitchen block for Ubuntu 14.04
Gemfile Fix #11 - add test-kitchen support
README.rdoc execute provider, readrme update
Thorfile Fix #11 - add test-kitchen support
Vagrantfile Fix #11 - add test-kitchen support
chefignore Fix #11 - add test-kitchen support
metadata.rb Adds php version contraint. Closes #23.



Installs the Drush CLI tool for Drupal, either via PEAR package or directly from source via Git. Also included is a recipe that can be used to install drush_make via the `drush pm-download` command.



The following platforms are supported by this cookbook, meaning that the recipes run on these platforms without error.

  • Debian

  • Ubuntu

  • CentOS



Installs drush using the desired `install_method` recipe, and also includes minor recipes to meet dependencies.


Installs drush via PEAR package manager.


Install drush via Git from source repository.


Upgrades PEAR to v1.9.1, which meets minimum required by drush via PEAR.


Installs PEAR Console_Table extension dependency.


Executes a drush command to install drush_make. If the `drush make` command is already available, this command will not be run.



  • `node['drush']['install_method']` - Indicates the desired install method, currently either `git` or `pear`.

  • `node['drush']['version']` - Drush preferred state (stable, beta, devel) or version of format x.y.z when install_method is pear (eg. 5.0.0).

When install_method is git, the format is a git reference commit/tag/branch (eg. 31d768a / 7.x-4.x / 7.x-5.0 )

  • `node['drush']['allreleases']` - URL of allreleases.xml for pear to install from preferred states.

  • `node['drush']['make']['version']` - Drush Make version of format x.y

  • `node['drush']['install_dir']` - Where to install Drush via Git. Used to install Drush Make as well.


Simply include the `drush` or `drush::make` recipe wherever you would like drush installed. You may alter the `install_method` and `version` attributes appropriately.


This cookbook includes LWRP. The drush_execute resource is used to execute a drush command. Commands that are executed with this resource are (by their nature) not idempotent, as they are typically unique to the environment in which they are run.


drush_execute "command" do
  cwd drupal_path
  options %W{views


  • cwd drupal work directory

  • command is the name of the command that will be run

  • options is zero (or more) of the specific command available options

  • :action is the step that the resource will ask the provider to take during the chef-client. :run Default. Indicates that the command should be run or :nothing.

Something went wrong with that request. Please try again.