Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit 3b672b9

Browse files
committed
Update geerlingguy.drupal role to latest version.
1 parent 4c070d6 commit 3b672b9

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed

provisioning/requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- src: geerlingguy.daemonize
1919
version: 1.2.0
2020
- src: geerlingguy.drupal
21-
version: 2.5.4
21+
version: 2.6.0
2222
- src: geerlingguy.drupal-console
2323
version: 1.1.1
2424
- src: geerlingguy.drush
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
skip_list:
22
- '204'
3+
- '602'
4+
- '503'

provisioning/roles/geerlingguy.drupal/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,15 @@ Set this to `true` and `drupal_build_composer*` to `false` if you would like to
5454
drupal_build_composer: false
5555
drupal_composer_path: "/path/to/drupal.composer.json"
5656
drupal_composer_install_dir: "/var/www/drupal"
57+
drupal_composer_no_dev: true
5758
drupal_composer_dependencies:
5859
- "drupal/devel:^1.2"
5960

60-
Set `drupal_build_makefile` to `false` and this to `true` if you are using a Composer-based site deployment strategy.
61+
Set `drupal_build_makefile` to `false` and this to `true` if you are using a Composer-based site deployment strategy. The other options should be relatively straightforward.
62+
63+
drupal_composer_bin_dir: "vendor/bin"
64+
65+
If you set the `bin-dir` in your project's `composer.json` file to a value other than `vendor/bin`, override this variable with the same directory path.
6166

6267
### Create a new project using `drupal-project` (Composer)
6368

@@ -71,6 +76,10 @@ Set this to `true` and `drupal_build_makefile`, `drupal_build_composer` to `fals
7176

7277
drupal_core_path: "{{ drupal_deploy_dir }}/web"
7378
drupal_core_owner: "{{ ansible_ssh_user | default(ansible_env.SUDO_USER, true) | default(ansible_env.USER, true) | default(ansible_user_id) }}"
79+
drupal_core_owner_become: false
80+
81+
The path to Drupal's root, along with the ownership properties. If you are not running Ansible as the user that should have ownership over the core path, specify the desired system user in `drupal_core_owner` and set `drupal_core_owner_become: true`.
82+
7483
drupal_db_user: drupal
7584
drupal_db_password: drupal
7685
drupal_db_name: drupal

provisioning/roles/geerlingguy.drupal/defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ drupal_build_makefile: false
1515
drush_makefile_path: "/path/to/drupal.make.yml"
1616
drush_make_options: "--no-gitinfofile"
1717

18+
# You can configure the `bin-dir` in your project's composer.json `config` key.
19+
drupal_composer_bin_dir: "vendor/bin"
20+
1821
# Set 'drupal_build_makefile' to 'false' and this to 'true' if you are using a
1922
# Composer-based site deployment strategy.
2023
drupal_build_composer: false
2124
drupal_composer_path: "/path/to/drupal.composer.json"
2225
drupal_composer_install_dir: "{{ drupal_deploy_dir }}"
26+
drupal_composer_no_dev: true
2327
drupal_composer_dependencies:
2428
- "drupal/devel:^1.2"
2529

@@ -33,6 +37,7 @@ drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction
3337
# Required Drupal settings.
3438
drupal_core_path: "{{ drupal_deploy_dir }}/web"
3539
drupal_core_owner: "{{ ansible_ssh_user | default(ansible_env.SUDO_USER, true) | default(ansible_env.USER, true) | default(ansible_user_id) }}"
40+
drupal_core_owner_become: false
3641
drupal_db_user: drupal
3742
drupal_db_password: drupal
3843
drupal_db_name: drupal

provisioning/roles/geerlingguy.drupal/tasks/deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
accept_hostkey: "{{ drupal_deploy_accept_hostkey }}"
1919
register: drupal_deploy_repo_updated
2020
notify: clear opcache
21-
become: false
21+
become: "{{ drupal_core_owner_become }}"
22+
become_user: "{{ drupal_core_owner }}"
2223

2324
- name: Check if a composer.json file is present.
2425
stat: "path={{ drupal_deploy_dir }}/composer.json"
@@ -28,7 +29,9 @@
2829
composer:
2930
command: install
3031
working_dir: "{{ drupal_deploy_dir }}"
32+
no_dev: "{{ drupal_composer_no_dev }}"
3133
when:
3234
- drupal_deploy_composer_file.stat.exists
3335
- drupal_deploy_composer_install
34-
become: false
36+
become: "{{ drupal_core_owner_become }}"
37+
become_user: "{{ drupal_core_owner }}"

provisioning/roles/geerlingguy.drupal/tasks/install-site.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{{ drush_path }} site-install {{ drupal_install_profile | default('standard') }} -y
2424
--root={{ drupal_core_path }}
2525
--site-name="{{ drupal_site_name }}"
26-
--account-name={{ drupal_account_name }}
26+
--account-name="{{ drupal_account_name }}"
2727
--account-pass={{ drupal_account_pass }}
2828
--db-url={{ drupal_db_backend }}://{{ drupal_db_user }}:{{ drupal_db_password }}@{{ drupal_db_host }}/{{ drupal_db_name }}
2929
{{ drupal_site_install_extra_args | join(" ") }}

provisioning/roles/geerlingguy.drupal/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242

4343
# Set Drush variables.
4444
- name: Check if a project specific Drush binary exists.
45-
stat: "path={{ drupal_composer_install_dir }}/vendor/bin/drush"
45+
stat: "path={{ drupal_composer_install_dir }}/{{ drupal_composer_bin_dir }}/drush"
4646
register: drush_vendor_bin
4747
ignore_errors: true
4848

4949
- name: Use project specific Drush if available.
5050
set_fact:
51-
drush_path: "{{ drupal_composer_install_dir }}/vendor/bin/drush"
51+
drush_path: "{{ drupal_composer_install_dir }}/{{ drupal_composer_bin_dir }}/drush"
5252
when: drush_vendor_bin.stat.exists
5353

5454
# Install site if configured.

0 commit comments

Comments
 (0)