Skip to content
Snippets Groups Projects
Commit 55dc8d0e authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/arocom#152 Make config root directory configurable

parent e22cd945
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,14 @@
# file: roles/drupal/tasks/deploy/finalize_d8.yml
- name: "Check for config directory"
stat: path='{{ webRoot }}/config'
stat: path='{{ webRoot }}{{ drupal.configRoot|default("/config") }}'
register: directory
- block:
- name: "Ensure site specific config directory"
file:
path: '{{ webRoot }}/config/{{ item.shortname|default("default") }}'
path: '{{ webRoot }}{{ drupal.configRoot|default("/config") }}/{{ item.shortname|default("default") }}'
state: 'directory'
owner: '{{ apacheUser }}'
group: '{{ apacheUser }}'
......@@ -18,7 +18,7 @@
- name: "Link to site specific config directory"
file:
src: '../../../config/{{ item.shortname|default("default") }}'
src: '../../..{{ drupal.configRoot|default("/config") }}/{{ item.shortname|default("default") }}'
path: '{{ drupalRoot }}/sites/{{ item.shortname|default("default") }}/files/{{ item.config|default("config") }}'
state: 'link'
force: yes
......
......@@ -15,6 +15,6 @@ if [ -f 'ansible.patch' ]; then
fi
chown -R {{ apacheUser }}:{{ apacheUser }} {{ path }}
chmod -R ug+r,ug-w,o-w,o-r {{ path }}
if [ -d '{{ path }}/config' ]; then
chmod -R og+w {{ path }}/config
if [ -d '{{ webRoot }}{{ drupal.configRoot|default("/config") }}' ]; then
chmod -R og+w {{ webRoot }}{{ drupal.configRoot|default("/config") }}
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment