Ensure all setting files and folder are writable
This commit is contained in:
parent
78235a052d
commit
999af48889
1 changed files with 13 additions and 9 deletions
|
@ -1,27 +1,31 @@
|
||||||
---
|
---
|
||||||
- name: determine status of settings location
|
- name: determine status of settings directory and files
|
||||||
stat:
|
find:
|
||||||
path: "{{ drupal_core_path }}/sites/default"
|
paths: "{{ drupal_core_path }}/sites/default/"
|
||||||
register: stat_result
|
recurse: no
|
||||||
|
register: find_result
|
||||||
|
|
||||||
- name: ensure settings location is writable
|
- name: ensure settings directory is writable
|
||||||
file:
|
file:
|
||||||
path: "{{ drupal_core_path }}/sites/default"
|
path: "{{ drupal_core_path }}/sites/default"
|
||||||
mode: 0775
|
mode: 0775
|
||||||
state: directory
|
state: directory
|
||||||
owner: vagrant
|
owner: vagrant
|
||||||
group: vagrant
|
group: vagrant
|
||||||
when: stat_result.stat.exists == true and stat_result.stat.writeable == false
|
when: find_result.failed == false
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: ensure settings file is still writable
|
- name: ensure setting files are writable
|
||||||
file:
|
file:
|
||||||
path: "{{ drupal_core_path }}/sites/default/settings.php"
|
path: "{{ setting_file.path }}"
|
||||||
mode: 0664
|
mode: 0664
|
||||||
state: file
|
state: file
|
||||||
owner: vagrant
|
owner: vagrant
|
||||||
group: vagrant
|
group: vagrant
|
||||||
when: stat_result.stat.exists == true and stat_result.stat.writeable == false
|
when: find_result.failed == false
|
||||||
|
loop: "{{ find_result.files }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: setting_file
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Run composer install.
|
- name: Run composer install.
|
||||||
|
|
Loading…
Reference in a new issue