# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [all] ********************************************************************* TASK [Gathering Facts] ********************************************************* Thursday 18 August 2022 15:00:11 +0000 (0:00:00.029) 0:00:00.029 ******* ok: [sut] TASK [Set up test environment] ************************************************* Thursday 18 August 2022 15:00:12 +0000 (0:00:00.822) 0:00:00.852 ******* included: /WORKDIR/dist-git-vpn-various_improvements-U_YlyE/tests/tasks/setup_test.yml for sut TASK [Set platform/version specific variables] ********************************* Thursday 18 August 2022 15:00:12 +0000 (0:00:00.038) 0:00:00.891 ******* TASK [linux-system-roles.vpn : Ensure ansible_facts used by role] ************** Thursday 18 August 2022 15:00:12 +0000 (0:00:00.042) 0:00:00.933 ******* ok: [sut] TASK [linux-system-roles.vpn : Set platform/version specific variables] ******** Thursday 18 August 2022 15:00:13 +0000 (0:00:00.468) 0:00:01.401 ******* skipping: [sut] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [sut] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [sut] => (item=RedHat_8.yml) => { "ansible_facts": { "__vpn_nss_location": "/etc/ipsec.d" }, "ansible_included_var_files": [ "/WORKDIR/dist-git-vpn-various_improvements-U_YlyE/tests/roles/linux-system-roles.vpn/vars/RedHat_8.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml" } skipping: [sut] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [Change inventory_hostname] *********************************************** Thursday 18 August 2022 15:00:13 +0000 (0:00:00.087) 0:00:01.489 ******* ok: [sut] => { "ansible_facts": { "inventory_hostname": "mainhost.local" }, "changed": false } TASK [add dummy main host] ***************************************************** Thursday 18 August 2022 15:00:13 +0000 (0:00:00.056) 0:00:01.545 ******* changed: [sut] => { "add_host": { "groups": [], "host_name": "mainhost.local", "host_vars": {} }, "changed": true } TASK [Create nss directory for testing] **************************************** Thursday 18 August 2022 15:00:13 +0000 (0:00:00.055) 0:00:01.601 ******* changed: [sut] => { "changed": true, "gid": 0, "group": "root", "mode": "0600", "owner": "root", "path": "/etc/ipsec.d", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Create /etc/ipsec.d directory for testing] ******************************* Thursday 18 August 2022 15:00:13 +0000 (0:00:00.357) 0:00:01.958 ******* ok: [sut] => { "changed": false, "gid": 0, "group": "root", "mode": "0600", "owner": "root", "path": "/etc/ipsec.d", "secontext": "unconfined_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Dynamically add more hosts] ********************************************** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.238) 0:00:02.197 ******* included: /WORKDIR/dist-git-vpn-various_improvements-U_YlyE/tests/tasks/add_hosts.yml for sut TASK [dynamically add multiple hosts for testing] ****************************** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.033) 0:00:02.230 ******* changed: [sut] => (item=1) => { "add_host": { "groups": [ "testing" ], "host_name": "host01.local", "host_vars": { "cert_name": "dyn_cert", "current_ip": "169.254.1.1", "current_subnet": "169.254.0.0/16" } }, "ansible_loop_var": "item", "changed": true, "item": 1 } changed: [sut] => (item=2) => { "add_host": { "groups": [ "testing" ], "host_name": "host02.local", "host_vars": { "cert_name": "dyn_cert", "current_ip": "169.254.1.1", "current_subnet": "169.254.0.0/16" } }, "ansible_loop_var": "item", "changed": true, "item": 2 } TASK [create mock vpn_connections] ********************************************* Thursday 18 August 2022 15:00:14 +0000 (0:00:00.065) 0:00:02.295 ******* ok: [sut] => { "ansible_facts": { "vpn_connections": [ { "hosts": { "host01.local": "", "host02.local": "", "mainhost.local": "", "sut": "" } } ] }, "changed": false } TASK [Create dummy policies directory for testing] ***************************** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.058) 0:00:02.353 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Create dummy policy files for testing] *********************************** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.049) 0:00:02.402 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Create dummy policy files for testing] *********************************** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.048) 0:00:02.451 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Create dummy policy files for testing] *********************************** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.048) 0:00:02.499 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Add cert options to check] *********************************************** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.047) 0:00:02.547 ******* ok: [sut] => { "ansible_facts": { "vpn_connections": [ { "auth_method": "cert", "auto": "start", "hosts": { "host01.local": { "cert_name": "cert2" }, "host02.local": { "cert_name": "cert3" }, "mainhost.local": { "cert_name": "cert1" }, "sut": { "cert_name": "cert4" } }, "name": "tunnel1" } ] }, "changed": false } TASK [Save certname for main host] ********************************************* Thursday 18 August 2022 15:00:14 +0000 (0:00:00.058) 0:00:02.605 ******* ok: [sut] => { "ansible_facts": { "__vpn_main_certname": "cert1" }, "changed": false } TASK [Use vpn role] ************************************************************ Thursday 18 August 2022 15:00:14 +0000 (0:00:00.053) 0:00:02.659 ******* TASK [linux-system-roles.vpn : set platform/version specific variables] ******** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.055) 0:00:02.715 ******* included: /WORKDIR/dist-git-vpn-various_improvements-U_YlyE/tests/roles/linux-system-roles.vpn/tasks/set_vars.yml for sut TASK [linux-system-roles.vpn : Ensure ansible_facts used by role] ************** Thursday 18 August 2022 15:00:14 +0000 (0:00:00.032) 0:00:02.747 ******* ok: [sut] TASK [linux-system-roles.vpn : Set platform/version specific variables] ******** Thursday 18 August 2022 15:00:15 +0000 (0:00:00.443) 0:00:03.191 ******* skipping: [sut] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [sut] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat.yml", "skip_reason": "Conditional result was False" } ok: [sut] => (item=RedHat_8.yml) => { "ansible_facts": { "__vpn_nss_location": "/etc/ipsec.d" }, "ansible_included_var_files": [ "/WORKDIR/dist-git-vpn-various_improvements-U_YlyE/tests/roles/linux-system-roles.vpn/vars/RedHat_8.yml" ], "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.yml" } skipping: [sut] => (item=RedHat_8.7.yml) => { "ansible_loop_var": "item", "changed": false, "item": "RedHat_8.7.yml", "skip_reason": "Conditional result was False" } TASK [linux-system-roles.vpn : Ensure required packages are installed] ********* Thursday 18 August 2022 15:00:15 +0000 (0:00:00.088) 0:00:03.280 ******* changed: [sut] => { "changed": true, "rc": 0, "results": [ "Installed: libreswan-4.5-1.el8.x86_64", "Installed: nss-tools-3.79.0-8.el8_6.x86_64", "Installed: ldns-1.7.0-21.el8.x86_64" ] } TASK [linux-system-roles.vpn : Ensure OpenSSL is installed on the controller] *** Thursday 18 August 2022 15:00:19 +0000 (0:00:04.749) 0:00:08.029 ******* fatal: [sut -> localhost]: FAILED! => { "changed": false, "cmd": "dnf install -y python3-dnf", "rc": 1, "results": [] } STDERR: Error: This command has to be run with superuser privileges (under the root user on most systems). MSG: Could not import the dnf python module using /opt/ansible-2.9/bin/python3.6 (3.6.8 (default, Mar 25 2022, 11:15:52) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]). Please install `python3-dnf` package or ensure you have specified the correct ansible_python_interpreter. NO MORE HOSTS LEFT ************************************************************* to retry, use: --limit @/tmp/tests_host_to_host_cert.retry PLAY RECAP ********************************************************************* sut : ok=17 changed=4 unreachable=0 failed=1 skipped=4 rescued=0 ignored=0 Thursday 18 August 2022 15:00:20 +0000 (0:00:01.019) 0:00:09.049 ******* =============================================================================== linux-system-roles.vpn : Ensure required packages are installed --------- 4.75s linux-system-roles.vpn : Ensure OpenSSL is installed on the controller --- 1.02s Gathering Facts --------------------------------------------------------- 0.82s linux-system-roles.vpn : Ensure ansible_facts used by role -------------- 0.47s linux-system-roles.vpn : Ensure ansible_facts used by role -------------- 0.44s Create nss directory for testing ---------------------------------------- 0.36s Create /etc/ipsec.d directory for testing ------------------------------- 0.24s linux-system-roles.vpn : Set platform/version specific variables -------- 0.09s linux-system-roles.vpn : Set platform/version specific variables -------- 0.09s dynamically add multiple hosts for testing ------------------------------ 0.07s Add cert options to check ----------------------------------------------- 0.06s create mock vpn_connections --------------------------------------------- 0.06s Change inventory_hostname ----------------------------------------------- 0.06s add dummy main host ----------------------------------------------------- 0.06s Use vpn role ------------------------------------------------------------ 0.06s Save certname for main host --------------------------------------------- 0.05s Create dummy policies directory for testing ----------------------------- 0.05s Create dummy policy files for testing ----------------------------------- 0.05s Create dummy policy files for testing ----------------------------------- 0.05s Create dummy policy files for testing ----------------------------------- 0.05s ---^---^---^---^---^--- # STDERR: ---v---v---v---v---v--- /opt/ansible-2.9/lib/python3.6/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release. from cryptography.exceptions import InvalidSignature ---^---^---^---^---^---