# STDOUT: ---v---v---v---v---v--- Using /etc/ansible/ansible.cfg as config file PLAY [all] ********************************************************************* TASK [Gathering Facts] ********************************************************* Thursday 18 August 2022 15:08:26 +0000 (0:00:00.029) 0:00:00.029 ******* ok: [sut] TASK [Set up test environment] ************************************************* Thursday 18 August 2022 15:08:26 +0000 (0:00:00.829) 0:00:00.859 ******* 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:08:27 +0000 (0:00:00.038) 0:00:00.897 ******* TASK [linux-system-roles.vpn : Ensure ansible_facts used by role] ************** Thursday 18 August 2022 15:08:27 +0000 (0:00:00.039) 0:00:00.936 ******* ok: [sut] TASK [linux-system-roles.vpn : Set platform/version specific variables] ******** Thursday 18 August 2022 15:08:27 +0000 (0:00:00.457) 0:00:01.394 ******* 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:08:27 +0000 (0:00:00.083) 0:00:01.478 ******* ok: [sut] => { "ansible_facts": { "inventory_hostname": "mainhost.local" }, "changed": false } TASK [add dummy main host] ***************************************************** Thursday 18 August 2022 15:08:27 +0000 (0:00:00.053) 0:00:01.531 ******* changed: [sut] => { "add_host": { "groups": [], "host_name": "mainhost.local", "host_vars": {} }, "changed": true } TASK [Create nss directory for testing] **************************************** Thursday 18 August 2022 15:08:27 +0000 (0:00:00.054) 0:00:01.586 ******* 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:08:28 +0000 (0:00:00.356) 0:00:01.942 ******* 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:08:28 +0000 (0:00:00.240) 0:00:02.183 ******* 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:08:28 +0000 (0:00:00.033) 0:00:02.216 ******* 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:08:28 +0000 (0:00:00.063) 0:00:02.280 ******* 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:08:28 +0000 (0:00:00.054) 0:00:02.334 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Create dummy policy files for testing] *********************************** Thursday 18 August 2022 15:08:28 +0000 (0:00:00.048) 0:00:02.382 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Create dummy policy files for testing] *********************************** Thursday 18 August 2022 15:08:28 +0000 (0:00:00.048) 0:00:02.431 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Create dummy policy files for testing] *********************************** Thursday 18 August 2022 15:08:28 +0000 (0:00:00.049) 0:00:02.481 ******* skipping: [sut] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Add extra options and unmanaged host] ************************************ Thursday 18 August 2022 15:08:28 +0000 (0:00:00.048) 0:00:02.530 ******* ok: [sut] => { "ansible_facts": { "vpn_connections": [ { "hosts": { "host01.local": "", "host02.local": "", "host03.local": { "hostname": "169.254.1.1" }, "mainhost.local": "", "sut": "" } } ] }, "changed": false } TASK [Use vpn role] ************************************************************ Thursday 18 August 2022 15:08:28 +0000 (0:00:00.052) 0:00:02.582 ******* TASK [linux-system-roles.vpn : set platform/version specific variables] ******** Thursday 18 August 2022 15:08:28 +0000 (0:00:00.055) 0:00:02.638 ******* 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:08:28 +0000 (0:00:00.033) 0:00:02.672 ******* ok: [sut] TASK [linux-system-roles.vpn : Set platform/version specific variables] ******** Thursday 18 August 2022 15:08:29 +0000 (0:00:00.447) 0:00:03.119 ******* 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:08:29 +0000 (0:00:00.086) 0:00:03.205 ******* 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:08:34 +0000 (0:00:04.661) 0:00:07.867 ******* 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_unmanaged_host.retry PLAY RECAP ********************************************************************* sut : ok=16 changed=4 unreachable=0 failed=1 skipped=4 rescued=0 ignored=0 Thursday 18 August 2022 15:08:35 +0000 (0:00:01.022) 0:00:08.889 ******* =============================================================================== linux-system-roles.vpn : Ensure required packages are installed --------- 4.66s linux-system-roles.vpn : Ensure OpenSSL is installed on the controller --- 1.02s Gathering Facts --------------------------------------------------------- 0.83s linux-system-roles.vpn : Ensure ansible_facts used by role -------------- 0.46s linux-system-roles.vpn : Ensure ansible_facts used by role -------------- 0.45s 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.08s dynamically add multiple hosts for testing ------------------------------ 0.06s Use vpn role ------------------------------------------------------------ 0.06s create mock vpn_connections --------------------------------------------- 0.05s add dummy main host ----------------------------------------------------- 0.05s Change inventory_hostname ----------------------------------------------- 0.05s Add extra options and unmanaged host ------------------------------------ 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 Create dummy policies directory for testing ----------------------------- 0.05s Set platform/version specific variables --------------------------------- 0.04s ---^---^---^---^---^--- # 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 ---^---^---^---^---^---