diff --git a/roles/product_install/tasks/main.yml b/roles/product_install/tasks/main.yml index e2773c1..f48858b 100644 --- a/roles/product_install/tasks/main.yml +++ b/roles/product_install/tasks/main.yml @@ -132,6 +132,7 @@ - "{{ atl_product_installation_versioned }}" - "{{ atl_product_version_cache_dir }}" - "{{ atl_product_home_shared_download_dir }}" + - "{{ atl_product_installation_current }}/logs" changed_when: false # For Molecule idempotence check # At this point atl_product_version should be set, cache if necessary. diff --git a/roles/product_startup/molecule/default/tests/test_default.py b/roles/product_startup/molecule/default/tests/test_default.py index d3b1994..aadbb03 100644 --- a/roles/product_startup/molecule/default/tests/test_default.py +++ b/roles/product_startup/molecule/default/tests/test_default.py @@ -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 diff --git a/roles/product_startup/tasks/main.yml b/roles/product_startup/tasks/main.yml index 23713e0..a5b59e1 100644 --- a/roles/product_startup/tasks/main.yml +++ b/roles/product_startup/tasks/main.yml @@ -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"