mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
Merged in DCD-791-symlink-conf-attachments (pull request #51)
DCD-791: Force attachments into shared home Approved-by: Geoff Jacobs <gjacobs@atlassian.com> Approved-by: Adam Brokes <abrokes@atlassian.com>
This commit is contained in:
@@ -16,6 +16,16 @@ def test_conf_init_file(host):
|
|||||||
assert f.exists
|
assert f.exists
|
||||||
assert f.contains('confluence.home = /var/atlassian/application-data/confluence')
|
assert f.contains('confluence.home = /var/atlassian/application-data/confluence')
|
||||||
|
|
||||||
|
def test_conf_attachment_symlinks(host):
|
||||||
|
assert host.file('/var/atlassian/application-data/confluence').is_directory
|
||||||
|
assert host.file('/media/atl/confluence/shared-home/attachments/').is_directory
|
||||||
|
|
||||||
|
f = host.file('/var/atlassian/application-data/confluence/attachments')
|
||||||
|
assert f.is_symlink and f.linked_to == '/media/atl/confluence/shared-home/attachments'
|
||||||
|
|
||||||
|
f = host.file('/var/atlassian/application-data/confluence/shared-home')
|
||||||
|
assert f.is_symlink and f.linked_to == '/media/atl/confluence/shared-home'
|
||||||
|
|
||||||
def test_setenv_file(host):
|
def test_setenv_file(host):
|
||||||
f = host.file('/opt/atlassian/confluence/current/bin/setenv.sh')
|
f = host.file('/opt/atlassian/confluence/current/bin/setenv.sh')
|
||||||
assert f.exists
|
assert f.exists
|
||||||
|
|||||||
@@ -10,9 +10,27 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ atl_product_home }}"
|
- "{{ atl_product_home }}"
|
||||||
- "{{ atl_product_home_shared }}"
|
- "{{ atl_product_home_shared }}"
|
||||||
|
- "{{ atl_product_home_shared }}/attachments"
|
||||||
- "{{ atl_product_shared_plugins }}"
|
- "{{ atl_product_shared_plugins }}"
|
||||||
changed_when: false # For Molecule idempotence check
|
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
|
||||||
|
file:
|
||||||
|
src: "{{ item.0 }}"
|
||||||
|
dest: "{{ item.1 }}"
|
||||||
|
force: false
|
||||||
|
state: link
|
||||||
|
mode: 0750
|
||||||
|
owner: "{{ atl_product_user }}"
|
||||||
|
group: "{{ atl_product_user }}"
|
||||||
|
vars:
|
||||||
|
- links:
|
||||||
|
- ["{{ atl_product_home_shared }}/", "{{ atl_product_home }}/shared-home"]
|
||||||
|
- ["{{ atl_product_home_shared }}/attachments/", "{{ atl_product_home }}/attachments"]
|
||||||
|
with_nested:
|
||||||
|
- "{{ links }}"
|
||||||
|
|
||||||
- name: Create Tomcat server config
|
- name: Create Tomcat server config
|
||||||
template:
|
template:
|
||||||
|
|||||||
Reference in New Issue
Block a user