Detect settings writeability status

This commit is contained in:
Chris Thompson 2018-08-23 23:12:32 -04:00
parent 01d9e07d10
commit 9ffb1df357

View file

@ -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"