@ -4,31 +4,41 @@
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
pip:
block:
name:
- name : Install packages to make TLS connections work on CentOS 6
- urllib3==1.10.2
pip:
- ndg_httpsclient==0.4.4
name:
- pyOpenSSL==16.2.0
- urllib3==1.10.2
state : present
- ndg_httpsclient==0.4.4
when:
- pyOpenSSL==16.2.0
- ansible_facts.distribution == 'CentOS'
state : present
- not ansible_facts.python.has_sslcontext
when:
- ansible_facts.distribution == 'CentOS'
- name : unarchive a tar from an URL
- not ansible_facts.python.has_sslcontext
unarchive:
- name : unarchive a tar from an URL
src : "https://releases.ansible.com/ansible/ansible-latest.tar.gz"
unarchive:
dest : "{{ remote_tmp_dir }}/test-unarchive-tar-gz"
src : "https://releases.ansible.com/ansible/ansible-latest.tar.gz"
mode : "0700"
dest : "{{ remote_tmp_dir }}/test-unarchive-tar-gz"
remote_src : yes
mode : "0700"
register : unarchive13
remote_src : yes
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
file:
pip:
path : '{{ remote_tmp_dir }}/test-unarchive-tar-gz'
name:
state : absent
- 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:
path : '{{ remote_tmp_dir }}/test-unarchive-tar-gz'
state : absent