mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 08:23:06 -06:00
ITPLAT-387 move logdir creation to somewhere that doesnt break tests and mod the service test
This commit is contained in:
@@ -132,6 +132,7 @@
|
|||||||
- "{{ atl_product_installation_versioned }}"
|
- "{{ atl_product_installation_versioned }}"
|
||||||
- "{{ atl_product_version_cache_dir }}"
|
- "{{ atl_product_version_cache_dir }}"
|
||||||
- "{{ atl_product_home_shared_download_dir }}"
|
- "{{ atl_product_home_shared_download_dir }}"
|
||||||
|
- "{{ atl_product_installation_current }}/logs"
|
||||||
changed_when: false # For Molecule idempotence check
|
changed_when: false # For Molecule idempotence check
|
||||||
|
|
||||||
# At this point atl_product_version should be set, cache if necessary.
|
# At this point atl_product_version should be set, cache if necessary.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
def test_service_file(host):
|
def test_service_file(host):
|
||||||
systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib"
|
systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib"
|
||||||
f = host.file(systemd_prefix+'/systemd/system/jira-software.service')
|
f = host.file(systemd_prefix+'/systemd/system/jira-software.service')
|
||||||
assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg$")
|
assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg >/opt/atlassian/jira-software/current/logs/catalina.out 2>/opt/atlassian/jira-software/current/logs/catalina.err$")
|
||||||
assert f.user == 'root'
|
assert f.user == 'root'
|
||||||
assert f.group == 'root'
|
assert f.group == 'root'
|
||||||
assert f.mode == 0o0640
|
assert f.mode == 0o0640
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: "Ensure startup log dir exists"
|
|
||||||
file:
|
|
||||||
path: "{{ atl_product_installation_current }}/logs"
|
|
||||||
state: directory
|
|
||||||
mode: 0750
|
|
||||||
owner: "{{ atl_product_user }}"
|
|
||||||
group: "{{ atl_product_user }}"
|
|
||||||
changed_when: false # For Molecule idempotence check
|
|
||||||
|
|
||||||
- name: "Install systemd service file"
|
- name: "Install systemd service file"
|
||||||
template:
|
template:
|
||||||
src: "product.service.j2"
|
src: "product.service.j2"
|
||||||
|
|||||||
Reference in New Issue
Block a user