diff --git a/roles/jira_download/molecule/version_override/tests/test_default.py b/roles/jira_download/molecule/version_override/tests/test_default.py index 1b81145..f5d9fdb 100644 --- a/roles/jira_download/molecule/version_override/tests/test_default.py +++ b/roles/jira_download/molecule/version_override/tests/test_default.py @@ -22,4 +22,10 @@ def test_latest_is_downloaded(host): installer = host.file('/opt/atlassian/tmp/jira-software.7.13.2.tar.gz') assert installer.exists assert installer.user == 'root' + +def test_latest_is_unpacked(host): + installer = host.file('/opt/atlassian/jira-software/atlassian-jira-software-7.13.2-standalone') + assert installer.exists + assert installer.is_directory + assert installer.user == 'jira' assert installer.mode == 0o0755 diff --git a/roles/jira_download/tasks/main.yml b/roles/jira_download/tasks/main.yml index c5b5d07..21281cd 100644 --- a/roles/jira_download/tasks/main.yml +++ b/roles/jira_download/tasks/main.yml @@ -17,7 +17,7 @@ - name: Use version for product version command: "cat {{ atl_product_version_cache }}" register: atl_product_version_file - changed_when: False + changed_when: false # Note: We don't cache this in the shared drive to the complexity # around download race-conditions if multiple nodes are starting at @@ -27,5 +27,14 @@ get_url: url: "{{ atl_product_download_url }}" dest: "{{ atl_product_download }}" - mode: 0755 + mode: 0644 force: false + +- name: Unpack the product packages + unarchive: + remote_src: true + src: "{{ atl_product_download }}" + dest: "{{ atl_product_installation_dir }}" + owner: "{{ atl_product_user }}" + group: "{{ atl_product_user }}" + mode: 0755 diff --git a/roles/product_common/tasks/main.yml b/roles/product_common/tasks/main.yml index dd20c8b..50cd421 100644 --- a/roles/product_common/tasks/main.yml +++ b/roles/product_common/tasks/main.yml @@ -18,3 +18,4 @@ - "{{ atl_product_home }}" - "{{ atl_installer_temp }}" - "{{ atl_product_home_shared }}" + - "{{ atl_product_installation_dir }}"