From 83a13856aebdf0e0f5736c6ac5b5ed84a323878d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 28 Sep 2020 08:09:03 +0200 Subject: [PATCH] Update prepare_http_tests as in https://github.com/ansible/ansible/pull/71841/files. --- .../prepare_http_tests/tasks/default.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/integration/targets/prepare_http_tests/tasks/default.yml b/tests/integration/targets/prepare_http_tests/tasks/default.yml index 5f098e72..bff90350 100644 --- a/tests/integration/targets/prepare_http_tests/tasks/default.yml +++ b/tests/integration/targets/prepare_http_tests/tasks/default.yml @@ -49,11 +49,16 @@ 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' + block: + - uri: + url: "http://ansible.http.tests/cacert.pem" + return_content: true + register: cacert_pem -- name: MacOS - Update ca certificates - command: /usr/local/opt/openssl/bin/c_rehash - when: ansible_os_family == 'Darwin' + - raw: '{{ ansible_python_interpreter }} -c "import ssl; print(ssl.get_default_verify_paths().cafile)"' + register: macos_cafile + + - blockinfile: + path: "{{ macos_cafile.stdout_lines|first }}" + block: "{{ cacert_pem.content }}"