mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
917 B
YAML
35 lines
917 B
YAML
4 years ago
|
# Test downloading a file before unarchiving it
|
||
|
- name: create our unarchive destination
|
||
|
file:
|
||
|
path: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
|
||
|
state: directory
|
||
|
|
||
|
- name: Install packages to make TLS connections work on CentOS 6
|
||
|
pip:
|
||
|
name:
|
||
|
- urllib3==1.10.2
|
||
|
- ndg_httpsclient==0.4.4
|
||
|
- pyOpenSSL==16.2.0
|
||
|
state: present
|
||
|
when:
|
||
|
- ansible_facts.distribution == 'CentOS'
|
||
|
- not ansible_facts.python.has_sslcontext
|
||
|
|
||
|
- name: unarchive a tar from an URL
|
||
|
unarchive:
|
||
|
src: "https://releases.ansible.com/ansible/ansible-latest.tar.gz"
|
||
|
dest: "{{ remote_tmp_dir }}/test-unarchive-tar-gz"
|
||
|
mode: "0700"
|
||
|
remote_src: yes
|
||
|
register: unarchive13
|
||
|
|
||
|
- name: Test that unarchive succeeded
|
||
|
assert:
|
||
|
that:
|
||
|
- "unarchive13.changed == true"
|
||
|
|
||
|
- name: remove our tar.gz unarchive destination
|
||
|
file:
|
||
|
path: '{{ remote_tmp_dir }}/test-unarchive-tar-gz'
|
||
|
state: absent
|