Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Install Drush Launcher to use Composer installed Drush in PATH
Browse files Browse the repository at this point in the history
  - Allows calling drush instead of ./vendor/bin/drush
  - Also allows using drush outside of the Drupal installation directory.
  • Loading branch information
madeline-holland committed Oct 1, 2022
1 parent bb7e0b3 commit 6870239
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ansible/roles/flightdeck-web-build/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
- "/etc/ssl/apache2"
- "/etc/apache2/sites.d"
- "/etc/php81"
- "/etc/drush"
- "/etc/wpcli"
- "/run/apache2"
- "/var/log/apache2"
Expand Down Expand Up @@ -133,11 +134,22 @@
group: "apache"
mode: "u=rwx,g=rwx,o=r"
loop:
- "/etc/drush"
- "/etc/wpcli"
- "/var/www/.composer/vendor/bin"
become: yes
become_user: "apache"
become_method: "su"
register: command_output
- debug:
var: command_output.stdout_lines
- name: Install Drush Launcher
get_url:
url: "https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar"
dest: "/etc/drush/drush"
owner: "apache"
group: "apache"
mode: "u=rx,g=rx,o=rx"
- name: Install Wordpress CLI
get_url:
url: "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
Expand All @@ -153,6 +165,8 @@
force: yes
follow: no
loop:
- src: "/etc/drush/drush"
dest: "/usr/local/bin/drush"
- src: "/etc/wpcli/wp"
dest: "/usr/local/bin/wp"
- name: Set node global packages to install as user-local
Expand Down

0 comments on commit 6870239

Please sign in to comment.