|
2 | 2 |
|
3 | 3 | [](https://travis-ci.org/geerlingguy/ansible-role-drush)
|
4 | 4 |
|
5 |
| -Installs [Drush](http://www.drush.org/en/master/), a command line shell and scripting interface for Drupal, on any Linux or UNIX system. |
| 5 | +Installs [Drush](http://www.drush.org), a command line shell and scripting interface for Drupal, on any Linux or UNIX system. |
6 | 6 |
|
7 | 7 | ## Requirements
|
8 | 8 |
|
9 | 9 | PHP must be installed on the system prior to running this role (suggested role: `geerlingguy.php`).
|
10 | 10 |
|
| 11 | +Global composer installation requires Composer to also be installed on the system (suggested role: `geerlingguy.composer`). |
| 12 | + |
11 | 13 | Source installation additionally requires Git and Composer to also be installed on the system (suggested roles: `geerlingguy.git` and `geerlingguy.composer`).
|
12 | 14 |
|
13 | 15 | ## Role Variables
|
14 | 16 |
|
15 | 17 | Available variables are listed below, along with default values (see `defaults/main.yml`):
|
16 | 18 |
|
17 |
| - drush_phar_url: https://github.com/drush-ops/drush/releases/download/8.1.10/drush.phar |
| 19 | +### Drush Launcher |
| 20 | + |
| 21 | +[Drush Launcher](https://github.com/drush-ops/drush-launcher) is a small wrapper around Drush for your global `$PATH`. |
| 22 | + |
| 23 | +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: |
| 24 | + |
| 25 | + drush_launcher_install: yes |
| 26 | + |
| 27 | +Set to `no` if you don't want the launcher installed. |
18 | 28 |
|
19 |
| -The URL from which the Drush phar file will be downloaded. |
| 29 | + drush_launcher_version: "0.5.1" |
20 | 30 |
|
21 |
| - drush_path: /usr/local/bin/drush |
| 31 | +The version of the Drush Launcher to install. This should exactly match an available [Drush Launcher release](https://github.com/drush-ops/drush-launcher/releases). |
| 32 | + |
| 33 | + drush_launcher_phar_url: https://github.com/drush-ops/drush-launcher/releases/download/{{ drush_launcher_version }}/drush.phar |
| 34 | + |
| 35 | +The URL from which the Drush Launcher phar file will be downloaded. |
| 36 | + |
| 37 | + drush_launcher_path: /usr/local/bin/drush |
22 | 38 |
|
23 | 39 | 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.
|
24 | 40 |
|
25 |
| - drush_config: ~/.drush |
| 41 | +### Drush global install via Composer |
26 | 42 |
|
27 |
| -Path to the directory where Drush will store its generated config. |
| 43 | +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! |
28 | 44 |
|
29 |
| - drush_install_from_source: no |
| 45 | + drush_composer_global_install: no |
30 | 46 |
|
31 |
| -Whether to use Git and Composer to install Drush from source. |
| 47 | +Set to `yes` (and set `drush_launcher_install` to `no`) if you want to install `drush` globally using Composer. |
32 | 48 |
|
33 |
| - drush_version: 8.1.10 |
| 49 | + drush_composer_version: "~9.0" |
34 | 50 |
|
35 |
| -The version of Drush to download (examples: `8.1.10`, `8.1.9`). This should exactly match an available [Drush release](https://github.com/drush-ops/drush/releases). Note that setting `drush_install_from_source` to `yes` changes the possible values for `drush_version`--see below for more information. |
| 51 | +The version constraint for the global Drush installation. |
| 52 | + |
| 53 | + drush_composer_update: no |
| 54 | + |
| 55 | +Whether to run `composer update drush/drush` to ensure the version of Drush installed globally is the latest version. |
| 56 | + |
| 57 | + drush_composer_path: /usr/local/bin/drush |
| 58 | + |
| 59 | +The path in which a symlink to the Drush binary installed via Composer should be placed. |
| 60 | + |
| 61 | +> 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`. |
36 | 62 |
|
37 | 63 | ### Variables used for source install (Git).
|
38 | 64 |
|
39 |
| - drush_install_path: /usr/local/share/drush |
| 65 | +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. |
| 66 | + |
| 67 | + drush_install_from_source: no |
| 68 | + |
| 69 | +Set to `yes` (and set `drush_launcher_install` to `no`) if you want to install `drush` globally using the Drush source code. |
| 70 | + |
| 71 | + drush_source_install_bin_path: /usr/local/bin/drush |
| 72 | + drush_source_install_path: /usr/local/share/drush |
40 | 73 |
|
41 | 74 | The location of the entire drush installation (includes all the supporting files, as well as the `drush` executable file.
|
42 | 75 |
|
43 |
| - drush_version: "master" |
| 76 | + drush_source_install_version: "8.x" |
44 | 77 |
|
45 |
| -The version of Drush to install (examples: `"master"` for the bleeding edge, `"7.x"`, `"6.x"`, `"6.2.0"`). This should be a string as it refers to a git branch, tag, or commit hash. |
| 78 | +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. |
46 | 79 |
|
47 | 80 | drush_keep_updated: no
|
48 | 81 | drush_force_update: no
|
|
0 commit comments