Simplify package install in unarchive test.

This will enable the test to work on supported platforms when modules for other platforms are not present.
pull/67244/head
Matt Clay 5 years ago
parent c92697acec
commit 6a79bb2b91

@ -18,21 +18,12 @@
# Make sure we start fresh # Make sure we start fresh
# Need unzip for unarchive module, and zip for archive creation. # Need unzip for unarchive module, and zip for archive creation.
- name: Ensure zip and unzip is present to create test archive (yum) - name: Ensure zip & unzip are present
yum: name=zip,unzip state=latest package:
when: ansible_pkg_mgr == 'yum' name:
- zip
- name: Ensure zip is present to create test archive (dnf) - unzip
dnf: name=zip state=latest when: ansible_pkg_mgr in ('yum', 'dnf', 'apt', 'pkgng')
when: ansible_pkg_mgr == 'dnf'
- name: Ensure zip & unzip is present to create test archive (apt)
apt: name=zip,unzip state=latest
when: ansible_pkg_mgr == 'apt'
- name: Ensure zip & unzip is present to create test archive (pkg)
pkgng: name=zip,unzip state=present
when: ansible_pkg_mgr == 'pkgng'
- name: prep our file - name: prep our file
copy: src=foo.txt dest={{remote_tmp_dir}}/foo-unarchive.txt copy: src=foo.txt dest={{remote_tmp_dir}}/foo-unarchive.txt

Loading…
Cancel
Save