This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 649
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
368 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
--- | ||
# Install from phar (faster, but less flexible). | ||
drush_version: "8.1.15" | ||
drush_phar_url: https://github.com/drush-ops/drush/releases/download/{{ drush_version }}/drush.phar | ||
drush_path: /usr/local/bin/drush | ||
# Install Drush Launcher. | ||
drush_launcher_install: yes | ||
drush_launcher_version: "0.5.1" | ||
drush_launcher_phar_url: https://github.com/drush-ops/drush-launcher/releases/download/{{ drush_launcher_version }}/drush.phar | ||
drush_launcher_path: /usr/local/bin/drush | ||
|
||
# Install Drush via Composer globally. | ||
drush_composer_global_install: no | ||
drush_composer_version: "~9.0" | ||
drush_composer_update: no | ||
drush_composer_path: /usr/local/bin/drush | ||
|
||
# Install from source (git clone + composer-based install). | ||
drush_install_from_source: no | ||
drush_install_path: /usr/local/share/drush | ||
# drush_version: "master" | ||
drush_source_install_bin_path: /usr/local/bin/drush | ||
drush_source_install_path: /usr/local/share/drush | ||
drush_source_install_version: "8.x" | ||
drush_keep_updated: no | ||
drush_force_update: no | ||
drush_force_composer_install: no | ||
|
||
drush_composer_cli_options: "--prefer-dist --no-interaction" | ||
drush_clone_depth: 1 |
22 changes: 22 additions & 0 deletions
22
provisioning/roles/geerlingguy.drush/tasks/install-drush-composer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
- name: Ensure Drush is installed globally via Composer. | ||
composer: | ||
command: require | ||
global_command: yes | ||
arguments: "drush/drush:{{ drush_composer_version }}" | ||
register: drush_composer_require | ||
|
||
- name: Update global Drush install if configured. | ||
composer: | ||
command: update | ||
global_command: yes | ||
arguments: "drush/drush --with-dependencies" | ||
when: | ||
- drush_composer_update | ||
- not drush_composer_require.changed | ||
|
||
- name: Ensure globally-installed Drush is symlinked into bin dir. | ||
file: | ||
src: "~/.composer/vendor/bin/drush" | ||
dest: "{{ drush_composer_path }}" | ||
state: link |
12 changes: 6 additions & 6 deletions
12
...roles/geerlingguy.drush/tasks/install.yml → ...uy.drush/tasks/install-drush-launcher.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
--- | ||
- name: Check current state. | ||
stat: | ||
path: "{{ drush_path }}" | ||
path: "{{ drush_launcher_path }}" | ||
register: drush_path_state | ||
|
||
- name: Perform cleanup of old symlink. | ||
file: | ||
path: "{{ drush_path }}" | ||
path: "{{ drush_launcher_path }}" | ||
state: absent | ||
when: drush_path_state.stat.islnk is defined and drush_path_state.stat.islnk | ||
|
||
- name: Ensure Drush path directory exists. | ||
file: | ||
path: "{{ drush_path | dirname }}" | ||
path: "{{ drush_launcher_path | dirname }}" | ||
state: directory | ||
mode: 0755 | ||
|
||
- name: Install Drush. | ||
get_url: | ||
url: "{{ drush_phar_url }}" | ||
dest: "{{ drush_path }}" | ||
url: "{{ drush_launcher_phar_url }}" | ||
dest: "{{ drush_launcher_path }}" | ||
|
||
- name: Ensure Drush is executable. | ||
file: | ||
path: "{{ drush_path }}" | ||
path: "{{ drush_launcher_path }}" | ||
mode: 0755 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
--- | ||
- include: install.yml | ||
when: not drush_install_from_source | ||
- include: install-drush-launcher.yml | ||
when: drush_launcher_install | ||
|
||
- include: source-install.yml | ||
- include: install-drush-composer.yml | ||
when: drush_composer_global_install | ||
|
||
- include: install-source.yml | ||
when: drush_install_from_source |
Oops, something went wrong.