Detect settings writeability status
This commit is contained in:
parent
01d9e07d10
commit
9ffb1df357
1 changed files with 8 additions and 2 deletions
|
@ -1,16 +1,22 @@
|
||||||
---
|
---
|
||||||
- name: ensure settings location is still writable
|
- name: determine status of settings location
|
||||||
|
stat:
|
||||||
|
path: "{{ drupal_core_path }}/sites/default"
|
||||||
|
register: stat_result
|
||||||
|
|
||||||
|
- name: ensure settings location is writable
|
||||||
file:
|
file:
|
||||||
path: "{{ drupal_core_path }}/sites/default"
|
path: "{{ drupal_core_path }}/sites/default"
|
||||||
mode: 0775
|
mode: 0775
|
||||||
state: directory
|
state: directory
|
||||||
|
when: stat_result.stat.exists == true and stat_result.stat.writeable == false
|
||||||
|
|
||||||
- name: ensure settings file is still writable
|
- name: ensure settings file is still writable
|
||||||
file:
|
file:
|
||||||
path: "{{ drupal_core_path }}/sites/default/settings.php"
|
path: "{{ drupal_core_path }}/sites/default/settings.php"
|
||||||
mode: 0664
|
mode: 0664
|
||||||
state: file
|
state: file
|
||||||
ignore_errors: yes
|
when: stat_result.stat.exists == true and stat_result.stat.writeable == false
|
||||||
|
|
||||||
- name: Run composer install.
|
- name: Run composer install.
|
||||||
command: "composer install"
|
command: "composer install"
|
||||||
|
|
Loading…
Reference in a new issue