From b64961cb967b4f372dbbc957521db6eaffd191a8 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Mon, 25 Nov 2019 15:36:07 +1100 Subject: [PATCH] DCD-791: Symlink both the local shared-home and attachments into the shared drive. --- roles/confluence_config/tasks/main.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/roles/confluence_config/tasks/main.yml b/roles/confluence_config/tasks/main.yml index fe52a95..b560dab 100644 --- a/roles/confluence_config/tasks/main.yml +++ b/roles/confluence_config/tasks/main.yml @@ -14,11 +14,26 @@ - "{{ atl_product_shared_plugins }}" changed_when: false # For Molecule idempotence check +# Create symlink to force single (unclustered) Confluence to store +# shared-data and attachments in the shared drive. - name: Symlink local attachments to shared storage - # Create symlink to force single (unclustered) Confluence to store - # attachment in the shared drive. file: - path: "{{ atl_product_home_shared }}/attachments/" + src: "{{ item[0] }}" + dest: "{{ item[1] }}" + force: false + state: link + mode: 0750 + owner: "{{ atl_product_user }}" + group: "{{ atl_product_user }}" + with_items: + - ["{{ atl_product_home_shared }}/", + "{{ atl_product_home }}/shared-home/"] + - ["{{ atl_product_home_shared }}/attachments/", + "{{ atl_product_home }}/attachments/"] + +- name: Symlink local attachments to shared storage + file: + src: "{{ atl_product_home_shared }}/attachments/" dest: "{{ atl_product_home }}/attachments/" force: false state: link