DCD-352: Make the name of the shared home dir configurable by product.

This commit is contained in:
Steve Smith
2019-05-27 12:39:50 +10:00
parent 697f86c399
commit 697051c9be
2 changed files with 16 additions and 1 deletions

View File

@@ -17,7 +17,11 @@ atl_shared_mountpoint: "/media/atl"
# FIXME: Some of these should be overridden from the environment?
atl_home_base: "/var/atlassian/application-data"
atl_product_home: "{{ atl_home_base }}/{{ atl_product_family }}"
atl_product_home_shared: "{{ atl_shared_mountpoint }}/{{ atl_product_family }}/shared"
atl_product_shared_home_map:
confluence: "shared-home"
jira: "shared"
stash: "FIXME"
atl_product_home_shared: "{{ atl_shared_mountpoint }}/{{ atl_product_family }}/{{ atl_product_shared_home_map[atl_product_family] }}"
atl_product_shared_plugins: "{{ atl_product_home_shared }}/plugins/installed-plugins"
atl_installation_base: "/opt/atlassian"

View File

@@ -1,4 +1,5 @@
import os
import pytest
import testinfra.utils.ansible_runner
@@ -42,6 +43,16 @@ def test_install_permissions(host):
assert host.file('/opt/atlassian/confluence/current/work/').user == 'confluence'
assert host.file('/opt/atlassian/confluence/current/temp/').user == 'confluence'
@pytest.mark.parametrize('directory', [
'/var/atlassian/application-data/confluence/',
'/media/atl/confluence/shared-home/'
])
def test_home_directories(host, directory):
d = host.file(directory)
assert d.exists
assert d.user == 'confluence'
# def test_dbconfig_file(host):
# f = host.file('/var/atlassian/application-data/jira/dbconfig.xml')
# assert f.exists