Overhaul httptester support in ansible-test. (#39892)

- Works with the --remote option.
- Can be disabled with the --disable-httptester option.
- Change image with the --httptester option.
- Only load and run httptester for targets that require it.
This commit is contained in:
Matt Clay
2018-05-09 09:24:39 -07:00
committed by GitHub
parent 3c32b483bc
commit c1f9efabf4
10 changed files with 313 additions and 47 deletions

View File

@@ -1,2 +1,3 @@
destructive
posix/ci/group1
needs/httptester

View File

@@ -1 +1,2 @@
posix/ci/group2
needs/httptester

View File

@@ -46,4 +46,26 @@
command: update-ca-certificates
when: ansible_os_family == 'Debian' or ansible_os_family == 'Suse'
- name: FreeBSD - Retrieve test cacert
get_url:
url: "http://ansible.http.tests/cacert.pem"
dest: "/tmp/ansible.pem"
when: ansible_os_family == 'FreeBSD'
- name: FreeBSD - Add cacert to root certificate store
blockinfile:
path: "/etc/ssl/cert.pem"
block: "{{ lookup('file', '/tmp/ansible.pem') }}"
when: ansible_os_family == 'FreeBSD'
- name: MacOS - Retrieve test cacert
get_url:
url: "http://ansible.http.tests/cacert.pem"
dest: "/usr/local/etc/openssl/certs/ansible.pem"
when: ansible_os_family == 'Darwin'
- name: MacOS - Update ca certificates
command: /usr/local/opt/openssl/bin/c_rehash
when: ansible_os_family == 'Darwin'
when: has_httptester|bool

View File

@@ -1,2 +1,3 @@
destructive
posix/ci/group1
needs/httptester