ansible-playbook [core 2.17.12] config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.12/site-packages/ansible ansible collection location = /tmp/collections-rND executable location = /usr/local/bin/ansible-playbook python version = 3.12.10 (main, May 9 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (/usr/bin/python3.12) jinja version = 3.1.6 libyaml = True No config file found; using defaults running playbook inside collection fedora.linux_system_roles Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_mesh_cert.yml ************************************************** 1 plays in /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml PLAY [Test mesh tunnels with certificates] ************************************* TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:3 Tuesday 17 June 2025 12:29:21 -0400 (0:00:00.019) 0:00:00.019 ********** [WARNING]: Platform linux on host managed-node1 is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible- core/2.17/reference_appendices/interpreter_discovery.html for more information. ok: [managed-node1] TASK [Set up test environment] ************************************************* task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:16 Tuesday 17 June 2025 12:29:24 -0400 (0:00:02.116) 0:00:02.136 ********** included: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml for managed-node1 TASK [Set platform/version specific variables] ********************************* task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:2 Tuesday 17 June 2025 12:29:24 -0400 (0:00:00.029) 0:00:02.166 ********** included: fedora.linux_system_roles.vpn for managed-node1 TASK [fedora.linux_system_roles.vpn : Ensure ansible_facts used by role] ******* task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:2 Tuesday 17 June 2025 12:29:24 -0400 (0:00:00.029) 0:00:02.195 ********** skipping: [managed-node1] => { "changed": false, "false_condition": "__vpn_required_facts | difference(ansible_facts.keys() | list) | length > 0", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.vpn : Check if system is ostree] *************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:10 Tuesday 17 June 2025 12:29:24 -0400 (0:00:00.035) 0:00:02.230 ********** ok: [managed-node1] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.vpn : Set flag to indicate system is ostree] *** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:15 Tuesday 17 June 2025 12:29:24 -0400 (0:00:00.437) 0:00:02.667 ********** ok: [managed-node1] => { "ansible_facts": { "__vpn_is_ostree": false }, "changed": false } TASK [fedora.linux_system_roles.vpn : Set platform/version specific variables] *** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:19 Tuesday 17 June 2025 12:29:24 -0400 (0:00:00.023) 0:00:02.691 ********** skipping: [managed-node1] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vpn_vars_file is file", "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vpn_vars_file is file", "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vpn_vars_file is file", "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vpn_vars_file is file", "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => { "changed": false } MSG: All items skipped TASK [Change inventory_hostname] *********************************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:11 Tuesday 17 June 2025 12:29:24 -0400 (0:00:00.036) 0:00:02.728 ********** skipping: [managed-node1] => { "changed": false, "false_condition": "not (__vpn_opportunistic | d(false) | bool)", "skip_reason": "Conditional result was False" } TASK [Add sample main host] **************************************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:18 Tuesday 17 June 2025 12:29:24 -0400 (0:00:00.036) 0:00:02.765 ********** skipping: [managed-node1] => { "changed": false, "false_condition": "not (__vpn_opportunistic | d(false) | bool)", "skip_reason": "Conditional result was False" } TASK [Create nss directory for testing] **************************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:22 Tuesday 17 June 2025 12:29:24 -0400 (0:00:00.035) 0:00:02.801 ********** changed: [managed-node1] => { "changed": true, "gid": 0, "group": "root", "mode": "0600", "owner": "root", "path": "/var/lib/ipsec/nss", "secontext": "unconfined_u:object_r:var_lib_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Create /etc/ipsec.d directory for testing] ******************************* task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:28 Tuesday 17 June 2025 12:29:25 -0400 (0:00:00.473) 0:00:03.274 ********** changed: [managed-node1] => { "changed": true, "gid": 0, "group": "root", "mode": "0600", "owner": "root", "path": "/etc/ipsec.d", "secontext": "system_u:object_r:ipsec_key_file_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Dynamically add more hosts] ********************************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:34 Tuesday 17 June 2025 12:29:25 -0400 (0:00:00.394) 0:00:03.668 ********** included: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/add_hosts.yml for managed-node1 TASK [Dynamically add multiple hosts for testing] ****************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/add_hosts.yml:2 Tuesday 17 June 2025 12:29:25 -0400 (0:00:00.032) 0:00:03.700 ********** creating host via 'add_host': hostname=host01.local creating host via 'add_host': hostname=host02.local changed: [managed-node1] => (item=1) => { "add_host": { "groups": [ "testing" ], "host_name": "host01.local", "host_vars": { "__vpn_current_ip": "169.254.1.1", "__vpn_current_subnet": "169.254.0.0/16", "cert_name": "dyn_cert" } }, "ansible_loop_var": "item", "changed": true, "item": 1 } changed: [managed-node1] => (item=2) => { "add_host": { "groups": [ "testing" ], "host_name": "host02.local", "host_vars": { "__vpn_current_ip": "169.254.1.1", "__vpn_current_subnet": "169.254.0.0/16", "cert_name": "dyn_cert" } }, "ansible_loop_var": "item", "changed": true, "item": 2 } TASK [Create mock vpn_connections] ********************************************* task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/add_hosts.yml:11 Tuesday 17 June 2025 12:29:25 -0400 (0:00:00.073) 0:00:03.773 ********** ok: [managed-node1] => { "ansible_facts": { "vpn_connections": [ { "hosts": { "host01.local": "", "host02.local": "", "managed-node1": "" } } ] }, "changed": false } TASK [Create sample policies directory for testing] **************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:40 Tuesday 17 June 2025 12:29:25 -0400 (0:00:00.063) 0:00:03.837 ********** changed: [managed-node1] => { "changed": true, "gid": 0, "group": "root", "mode": "0600", "owner": "root", "path": "/etc/ipsec.d/policies", "secontext": "unconfined_u:object_r:ipsec_key_file_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Create sample policy files for testing] ********************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:46 Tuesday 17 June 2025 12:29:26 -0400 (0:00:00.427) 0:00:04.264 ********** changed: [managed-node1] => { "changed": true, "dest": "/etc/ipsec.d/policies/private", "gid": 0, "group": "root", "mode": "0600", "owner": "root", "secontext": "unconfined_u:object_r:ipsec_key_file_t:s0", "size": 0, "state": "file", "uid": 0 } TASK [Create sample policy files for testing] ********************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:52 Tuesday 17 June 2025 12:29:26 -0400 (0:00:00.433) 0:00:04.697 ********** changed: [managed-node1] => { "changed": true, "dest": "/etc/ipsec.d/policies/private-or-clear", "gid": 0, "group": "root", "mode": "0600", "owner": "root", "secontext": "unconfined_u:object_r:ipsec_key_file_t:s0", "size": 0, "state": "file", "uid": 0 } TASK [Create sample policy files for testing] ********************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:58 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.431) 0:00:05.128 ********** changed: [managed-node1] => { "changed": true, "dest": "/etc/ipsec.d/policies/clear", "gid": 0, "group": "root", "mode": "0600", "owner": "root", "secontext": "unconfined_u:object_r:ipsec_key_file_t:s0", "size": 0, "state": "file", "uid": 0 } TASK [Ensure firewalld not running if not testing firewall] ******************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:67 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.381) 0:00:05.510 ********** skipping: [managed-node1] => { "changed": false, "false_condition": "not vpn_manage_firewall | d(false)", "skip_reason": "Conditional result was False" } TASK [Add extra options to check] ********************************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:21 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.034) 0:00:05.544 ********** ok: [managed-node1] => (item={'hosts': {'managed-node1': '', 'host01.local': '', 'host02.local': ''}}) => { "ansible_facts": { "__new_vpn_connections": [ { "auth_method": "cert", "hosts": { "host01.local": "", "host02.local": "", "managed-node1": "" }, "opportunistic": true, "policies": [ { "cidr": "203.0.113.0/24", "policy": "private" }, { "cidr": "198.51.100.0/24", "policy": "clear" } ] } ] }, "ansible_loop_var": "item", "changed": false, "item": { "hosts": { "host01.local": "", "host02.local": "", "managed-node1": "" } } } TASK [Reset vpn_connections] *************************************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:35 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.042) 0:00:05.586 ********** ok: [managed-node1] => { "ansible_facts": { "vpn_connections": [ { "auth_method": "cert", "hosts": { "host01.local": "", "host02.local": "", "managed-node1": "" }, "opportunistic": true, "policies": [ { "cidr": "203.0.113.0/24", "policy": "private" }, { "cidr": "198.51.100.0/24", "policy": "clear" } ] } ] }, "changed": false } TASK [Add cert_name fact to controller] **************************************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:39 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.018) 0:00:05.605 ********** ok: [managed-node1] => { "ansible_facts": { "cert_name": "main_cert" }, "changed": false } TASK [Use vpn role] ************************************************************ task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:43 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.025) 0:00:05.630 ********** included: fedora.linux_system_roles.vpn for managed-node1 TASK [fedora.linux_system_roles.vpn : Set platform/version specific variables] *** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/main.yml:3 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.088) 0:00:05.718 ********** included: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml for managed-node1 TASK [fedora.linux_system_roles.vpn : Ensure ansible_facts used by role] ******* task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:2 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.036) 0:00:05.755 ********** skipping: [managed-node1] => { "changed": false, "false_condition": "__vpn_required_facts | difference(ansible_facts.keys() | list) | length > 0", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.vpn : Check if system is ostree] *************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:10 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.059) 0:00:05.814 ********** skipping: [managed-node1] => { "changed": false, "false_condition": "not __vpn_is_ostree is defined", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.vpn : Set flag to indicate system is ostree] *** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:15 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.035) 0:00:05.850 ********** skipping: [managed-node1] => { "changed": false, "false_condition": "not __vpn_is_ostree is defined", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.vpn : Set platform/version specific variables] *** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:19 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.036) 0:00:05.886 ********** skipping: [managed-node1] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vpn_vars_file is file", "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vpn_vars_file is file", "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vpn_vars_file is file", "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vpn_vars_file is file", "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => { "changed": false } MSG: All items skipped TASK [fedora.linux_system_roles.vpn : Ensure required packages are installed] *** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/main.yml:6 Tuesday 17 June 2025 12:29:27 -0400 (0:00:00.062) 0:00:05.948 ********** changed: [managed-node1] => { "changed": true, "rc": 0, "results": [ "Installed: libreswan-4.15-8.el9.x86_64" ] } TASK [fedora.linux_system_roles.vpn : Configure firewall] ********************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/main.yml:13 Tuesday 17 June 2025 12:29:30 -0400 (0:00:02.764) 0:00:08.713 ********** included: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/firewall.yml for managed-node1 TASK [Ensure the vpn ports status with the firewall role] ********************** task path: /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/firewall.yml:3 Tuesday 17 June 2025 12:29:30 -0400 (0:00:00.020) 0:00:08.734 ********** ERROR! the role 'fedora.linux_system_roles.firewall' was not found in fedora.linux_system_roles:ansible.legacy:/tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/roles:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn The error appears to be in '/tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/firewall.yml': line 5, column 11, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: include_role: name: fedora.linux_system_roles.firewall ^ here fatal: [managed-node1]: FAILED! => { "changed": false, "reason": "the role 'fedora.linux_system_roles.firewall' was not found in fedora.linux_system_roles:ansible.legacy:/tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/roles:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn\n\nThe error appears to be in '/tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/firewall.yml': line 5, column 11, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n include_role:\n name: fedora.linux_system_roles.firewall\n ^ here\n" } PLAY RECAP ********************************************************************* managed-node1 : ok=21 changed=8 unreachable=0 failed=1 skipped=9 rescued=0 ignored=0 SYSTEM ROLES ERRORS BEGIN v1 [ { "ansible_version": "2.17.12", "end_time": "2025-06-17T16:29:30.746692+00:00Z", "host": "managed-node1", "message": "No message could be found", "start_time": "2025-06-17T16:29:30.710648+00:00Z", "task_name": "Ensure the vpn ports status with the firewall role", "task_path": "/tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/firewall.yml:3" } ] SYSTEM ROLES ERRORS END v1 TASKS RECAP ******************************************************************** Tuesday 17 June 2025 12:29:30 -0400 (0:00:00.037) 0:00:08.771 ********** =============================================================================== fedora.linux_system_roles.vpn : Ensure required packages are installed --- 2.76s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/main.yml:6 Gathering Facts --------------------------------------------------------- 2.12s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:3 Create nss directory for testing ---------------------------------------- 0.47s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:22 fedora.linux_system_roles.vpn : Check if system is ostree --------------- 0.44s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:10 Create sample policy files for testing ---------------------------------- 0.43s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:46 Create sample policy files for testing ---------------------------------- 0.43s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:52 Create sample policies directory for testing ---------------------------- 0.43s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:40 Create /etc/ipsec.d directory for testing ------------------------------- 0.39s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:28 Create sample policy files for testing ---------------------------------- 0.38s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:58 Use vpn role ------------------------------------------------------------ 0.09s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:43 Dynamically add multiple hosts for testing ------------------------------ 0.07s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/add_hosts.yml:2 Create mock vpn_connections --------------------------------------------- 0.06s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/add_hosts.yml:11 fedora.linux_system_roles.vpn : Set platform/version specific variables --- 0.06s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:19 fedora.linux_system_roles.vpn : Ensure ansible_facts used by role ------- 0.06s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:2 Add extra options to check ---------------------------------------------- 0.04s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tests_mesh_cert.yml:21 Ensure the vpn ports status with the firewall role ---------------------- 0.04s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/firewall.yml:3 fedora.linux_system_roles.vpn : Set platform/version specific variables --- 0.04s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/main.yml:3 fedora.linux_system_roles.vpn : Set platform/version specific variables --- 0.04s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:19 Change inventory_hostname ----------------------------------------------- 0.04s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/tests/vpn/tasks/setup_test.yml:11 fedora.linux_system_roles.vpn : Set flag to indicate system is ostree --- 0.04s /tmp/collections-rND/ansible_collections/fedora/linux_system_roles/roles/vpn/tasks/set_vars.yml:15