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.
42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
9 years ago
|
# The docker --link functionality gives us an ENV var we can key off of to see if we have access to
|
||
|
# the httptester container
|
||
|
- set_fact:
|
||
9 years ago
|
has_httptester: "{{ lookup('env', 'HTTPTESTER') != '' }}"
|
||
9 years ago
|
|
||
|
# If we are running with access to a httptester container, grab it's cacert and install it
|
||
|
- block:
|
||
|
# Override hostname defaults with httptester linked names
|
||
|
- include_vars: httptester.yml
|
||
|
|
||
|
- name: RedHat - Enable the dynamic CA configuration feature
|
||
|
command: update-ca-trust force-enable
|
||
|
when: ansible_os_family == 'RedHat'
|
||
|
|
||
|
- name: RedHat - Retrieve test cacert
|
||
|
get_url:
|
||
|
url: "http://ansible.http.tests/cacert.pem"
|
||
|
dest: "/etc/pki/ca-trust/source/anchors/ansible.pem"
|
||
|
when: ansible_os_family == 'RedHat'
|
||
|
|
||
9 years ago
|
- name: Suse - Retrieve test cacert
|
||
|
get_url:
|
||
|
url: "http://ansible.http.tests/cacert.pem"
|
||
|
dest: "/etc/pki/trust/anchors/ansible.pem"
|
||
|
when: ansible_os_family == 'Suse'
|
||
|
|
||
9 years ago
|
- name: Debian - Retrieve test cacert
|
||
|
get_url:
|
||
|
url: "http://ansible.http.tests/cacert.pem"
|
||
|
dest: "/usr/local/share/ca-certificates/ansible.crt"
|
||
|
when: ansible_os_family == 'Debian'
|
||
|
|
||
|
- name: Redhat - Update ca trust
|
||
|
command: update-ca-trust extract
|
||
|
when: ansible_os_family == 'RedHat'
|
||
|
|
||
9 years ago
|
- name: Debian/Suse - Update ca certificates
|
||
9 years ago
|
command: update-ca-certificates
|
||
9 years ago
|
when: ansible_os_family == 'Debian' or ansible_os_family == 'Suse'
|
||
9 years ago
|
|
||
|
when: has_httptester|bool
|