You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ansible-role-nginx/roles/ansible-role-drush/tasks/main.yml

38 lines
1.3 KiB

---
- name: Clone Drush from GitHub.
git:
repo: https://github.com/drush-ops/drush.git
dest: "{{ drush_install_path }}"
version: "{{ drush_version }}"
update: "{{ drush_keep_updated }}"
force: "{{ drush_force_update }}"
register: drush_clone
- name: Check for composer.json
stat: path={{ drush_install_path }}/composer.json
register: drush_composer
# See: https://github.com/geerlingguy/ansible-role-drush/issues/6
- name: Ensure Drush can be installed on Debian Wheezy.
shell: >
{{ composer_path }} update {{ drush_composer_cli_options }}
chdir={{ drush_install_path }}
when: drush_clone.changed and ansible_distribution == "Debian" and ansible_distribution_release == "wheezy" and drush_composer.stat.exists
- name: Install Drush dependencies with Composer.
shell: >
{{ composer_path }} install {{ drush_composer_cli_options }}
chdir={{ drush_install_path }}
when: drush_clone.changed and drush_composer.stat.exists
- name: Create drush symlink.
file:
src: "{{ drush_install_path }}/drush"
dest: "{{ drush_path }}"
state: link
- name: Run drush to finish setting it up.
command: "{{ drush_path }}"
register: drush_result
changed_when: "'Execute a drush command' not in drush_result.stdout"
become: no