ITPLAT-387 move logdir creation to somewhere that doesnt break tests and mod the service test

This commit is contained in:
Brett Meehan
2020-12-31 12:20:09 +11:00
parent 75c905fe7d
commit d270cb75cb
3 changed files with 2 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_service_file(host):
systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib"
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.group == 'root'
assert f.mode == 0o0640

View File

@@ -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"
template:
src: "product.service.j2"