diff options
author | Matt Clay <matt@mystile.com> | 2022-06-24 14:20:20 -0700 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2022-06-24 16:55:12 -0700 |
commit | 4594c0c6094fcf801caeef27a5170d39d2207b08 (patch) | |
tree | c61c1c7f3a5e3d106f0bc24a55ff0da1deab0041 /test/integration/targets/prepare_http_tests | |
parent | b9d13d222cfe4ebd9675d5bbf529e929daaded6f (diff) | |
download | ansible-4594c0c6094fcf801caeef27a5170d39d2207b08.tar.gz |
Fix HTTP tests on FreeBSD when running split.
Diffstat (limited to 'test/integration/targets/prepare_http_tests')
-rw-r--r-- | test/integration/targets/prepare_http_tests/tasks/default.yml | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/test/integration/targets/prepare_http_tests/tasks/default.yml b/test/integration/targets/prepare_http_tests/tasks/default.yml index 9ab8ad919f..2fb26a1248 100644 --- a/test/integration/targets/prepare_http_tests/tasks/default.yml +++ b/test/integration/targets/prepare_http_tests/tasks/default.yml @@ -36,29 +36,20 @@ command: update-ca-certificates when: ansible_os_family in ['Debian', 'Alpine', '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 - when: ansible_os_family == 'Darwin' +- name: Update cacert + when: ansible_os_family in ['FreeBSD', 'Darwin'] block: - - uri: + - name: Retrieve test cacert + uri: url: "http://ansible.http.tests/cacert.pem" return_content: true register: cacert_pem - - raw: '{{ ansible_python_interpreter }} -c "import ssl; print(ssl.get_default_verify_paths().cafile)"' - register: macos_cafile + - name: Locate cacert + command: '{{ ansible_python_interpreter }} -c "import ssl; print(ssl.get_default_verify_paths().cafile)"' + register: cafile_path - - blockinfile: - path: "{{ macos_cafile.stdout_lines|first }}" + - name: Update cacert + blockinfile: + path: "{{ cafile_path.stdout_lines|first }}" block: "{{ cacert_pem.content }}" |