Fix combinated run of unarchive and uri tests under centos 6
The unarchive integration test installs pinned packages via pip, the uri test installs them from system packages. This explodes. PR lets unarchive uninstall packages after test ran.
This commit is contained in:
parent
c295de661c
commit
ff88a2a06d
1 changed files with 38 additions and 28 deletions
|
@ -4,7 +4,9 @@
|
||||||
path: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
|
path: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Install packages to make TLS connections work on CentOS 6
|
- name: Test TLS download
|
||||||
|
block:
|
||||||
|
- name: Install packages to make TLS connections work on CentOS 6
|
||||||
pip:
|
pip:
|
||||||
name:
|
name:
|
||||||
- urllib3==1.10.2
|
- urllib3==1.10.2
|
||||||
|
@ -14,21 +16,29 @@
|
||||||
when:
|
when:
|
||||||
- ansible_facts.distribution == 'CentOS'
|
- ansible_facts.distribution == 'CentOS'
|
||||||
- not ansible_facts.python.has_sslcontext
|
- not ansible_facts.python.has_sslcontext
|
||||||
|
- name: unarchive a tar from an URL
|
||||||
- name: unarchive a tar from an URL
|
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "https://releases.ansible.com/ansible/ansible-latest.tar.gz"
|
src: "https://releases.ansible.com/ansible/ansible-latest.tar.gz"
|
||||||
dest: "{{ remote_tmp_dir }}/test-unarchive-tar-gz"
|
dest: "{{ remote_tmp_dir }}/test-unarchive-tar-gz"
|
||||||
mode: "0700"
|
mode: "0700"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
register: unarchive13
|
register: unarchive13
|
||||||
|
- name: Test that unarchive succeeded
|
||||||
- name: Test that unarchive succeeded
|
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "unarchive13.changed == true"
|
- "unarchive13.changed == true"
|
||||||
|
always:
|
||||||
- name: remove our tar.gz unarchive destination
|
- name: Uninstall CentOS 6 TLS connections packages
|
||||||
|
pip:
|
||||||
|
name:
|
||||||
|
- urllib3
|
||||||
|
- ndg_httpsclient
|
||||||
|
- pyOpenSSL
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- ansible_facts.distribution == 'CentOS'
|
||||||
|
- not ansible_facts.python.has_sslcontext
|
||||||
|
- name: remove our tar.gz unarchive destination
|
||||||
file:
|
file:
|
||||||
path: '{{ remote_tmp_dir }}/test-unarchive-tar-gz'
|
path: '{{ remote_tmp_dir }}/test-unarchive-tar-gz'
|
||||||
state: absent
|
state: absent
|
||||||
|
|
Loading…
Reference in a new issue