Role Detail

geerlingguy.drush

Drush - command line shell for Drupal
Downloads
43210
Type Ansible
Minimum Ansible Version 2.4
Installation $ ansible-galaxy install geerlingguy.drush
Tags
cli
command
development
drupal
drush
web
Last Commit
Last Imported
Version History
Version Release Date
3.1.1
3.1.0
3.0.0
2.0.2
2.0.1
2.0.0
1.2.1
1.2.0
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
OS Platforms
Platform Version
Debian buster
Debian etch
Debian jessie
Debian lenny
Debian sid
Debian squeeze
Debian stretch
Debian wheezy
EL 5
EL 6
EL 7
Fedora 16
Fedora 17
Fedora 18
Fedora 19
Fedora 20
Fedora 21
Fedora 22
Fedora 23
Fedora 24
Fedora 25
Fedora 26
Fedora 27
Fedora 28
FreeBSD 10.0
FreeBSD 10.1
FreeBSD 10.2
FreeBSD 10.3
FreeBSD 10.4
FreeBSD 11.0
FreeBSD 11.1
FreeBSD 8.0
FreeBSD 8.1
FreeBSD 8.2
FreeBSD 8.3
FreeBSD 8.4
FreeBSD 9.0
FreeBSD 9.1
FreeBSD 9.1
FreeBSD 9.2
FreeBSD 9.3
GenericBSD any
GenericLinux any
GenericUNIX any
opensuse 12.1
opensuse 12.2
opensuse 12.3
opensuse 13.1
opensuse 13.2
SLES 10SP3
SLES 10SP4
SLES 11
SLES 11SP1
SLES 11SP2
SLES 11SP3
SLES 11SP4
SLES 12
SLES 12SP1
Ubuntu artful
Ubuntu bionic
Ubuntu lucid
Ubuntu maverick
Ubuntu natty
Ubuntu oneiric
Ubuntu precise
Ubuntu quantal
Ubuntu raring
Ubuntu saucy
Ubuntu trusty
Ubuntu utopic
Ubuntu vivid
Ubuntu wily
Ubuntu xenial
Ubuntu yakkety
Ubuntu zesty
Last 10 Imports
Completed Status
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS

Ansible Role: Drush

Build Status

Installs Drush, a command line shell and scripting interface for Drupal, on any Linux or UNIX system.

Requirements

PHP must be installed on the system prior to running this role (suggested role: geerlingguy.php).

Global composer installation requires Composer to also be installed on the system (suggested role: geerlingguy.composer).

Source installation additionally requires Git and Composer to also be installed on the system (suggested roles: geerlingguy.git and geerlingguy.composer).

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

Drush Launcher

Drush Launcher is a small wrapper around Drush for your global $PATH.

It is the recommended way to use drush, but there are some situations where you might wish to install and run Drush globally without using Drush Launcher. The following variables control Drush Launcher's installation:

drush_launcher_install: yes

Set to no if you don't want the launcher installed.

drush_launcher_version: "0.5.1"

The version of the Drush Launcher to install. This should exactly match an available Drush Launcher release.

drush_launcher_phar_url: https://github.com/drush-ops/drush-launcher/releases/download/{{ drush_launcher_version }}/drush.phar

The URL from which the Drush Launcher phar file will be downloaded.

drush_launcher_path: /usr/local/bin/drush

The path where drush will be installed and available to your system. Should be in your user's $PATH so you can run commands simply with drush instead of the full path.

Drush global install via Composer

Some people need to have the full power of drush available globally, and this role allows the global install of Drush via Composer. If using this option, make sure you have Composer installed!

drush_composer_global_install: no

Set to yes (and set drush_launcher_install to no) if you want to install drush globally using Composer.

drush_composer_version: "~9.0"

The version constraint for the global Drush installation.

drush_composer_update: no

Whether to run composer update drush/drush to ensure the version of Drush installed globally is the latest version.

drush_composer_path: /usr/local/bin/drush

The path in which a symlink to the Drush binary installed via Composer should be placed.

NOTE: Composer 'global' installation is global to the user under which Drush is installed—e.g. if you install globally using the root user, drush will only work properly as root or when using sudo.

Variables used for source install (Git).

You can also install Drush from source if you need a bleeding-edge release, or if you need a specific version which can't be installed via Composer.

drush_install_from_source: no

Set to yes (and set drush_launcher_install to no) if you want to install drush globally using the Drush source code.

drush_source_install_bin_path: /usr/local/bin/drush
drush_source_install_path: /usr/local/share/drush

The location of the entire drush installation (includes all the supporting files, as well as the drush executable file.

drush_source_install_version: "8.x"

The version of Drush to install (examples: "master" for the bleeding edge, "8.x", "7.x", "6.2.0"). This should be a string as it refers to a git branch, tag, or commit hash.

drush_keep_updated: no
drush_force_update: no

Whether to keep Drush up-to-date with the latest revision of the branch specified by drush_version, and whether to force the update (e.g. overwrite local modifications to the drush repository).

drush_force_composer_install: no

Use this if you get an error message when provisioning like Unable to load autoload.php. Run composer install to fetch dependencies and write this file. It will force a composer install inside the Drush directory.

drush_composer_cli_options: "--prefer-source --no-interaction"

These options are the safest for avoiding GitHub API rate limits when installing Drush, and can be very helpful when working on dependencies/installation, but builds can be sped up substantially by changing the first option to --prefer-dist.

drush_clone_depth: 1

Whether to clone the entire repo (by default), or specify the number of previous commits for a smaller and faster clone.

Dependencies

None.

Example Playbook

- hosts: servers
  roles:
    - geerlingguy.drush

After the playbook runs, the drush command will be accessible from normal system accounts.

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

None