ITOPSENG-101 simpler work around junk paths in unarchive

This commit is contained in:
Brett Meehan
2019-11-11 13:17:15 +11:00
parent 1cf02e721f
commit 8a8b2a889d
2 changed files with 6 additions and 8 deletions

View File

@@ -32,7 +32,6 @@ def test_is_unpacked(host):
assert installer.mode == 0o0755
def test_obr_is_downloaded(host):
installer = host.file('/media/atl/downloads/jira-servicedesk-application-3.16.1.obr')
assert installer.exists
assert installer.user == 'root'

View File

@@ -156,18 +156,17 @@
owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}"
# Note as ansible unarchive cant handle "-j junk paths" we need to ignore errors to bypass the path verify
- name: Unpack the obr into the installed-plugins dir
unarchive:
remote_src: true
src: "{{ atl_obr_download }}"
dest: "{{ atl_product_version_cache_dir }}/plugins/installed-plugins"
creates: "{{ atl_product_version_cache_dir }}/plugins/installed-plugins/jira-servicedesk-application-{{ atl_jsd_build_info.json.name }}.jar"
extra_opts:
- -j
- -n
owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}"
mode: 0750
- name: Copy JSD dependency jars into the installed-plugins dir
copy:
src: "{{ item }}"
dest: "{{ atl_product_version_cache_dir }}/plugins/installed-plugins"
remote_src: true
with_fileglob: "{{ atl_product_version_cache_dir }}/plugins/installed-plugins/dependencies/*.jar"
ignore_errors: yes