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-Mf9 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 'json', as we already have a stdout callback. Skipping callback 'jsonl', 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_all_transitions.yml ******************************************** 1 plays in /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml PLAY [Test all the possible selinux_state transitions] ************************* TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:2 Saturday 24 May 2025 16:15:30 -0400 (0:00:00.017) 0:00:00.017 ********** [WARNING]: Platform linux on host managed-node2 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-node2] TASK [Check if system is ostree] *********************************************** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:17 Saturday 24 May 2025 16:15:33 -0400 (0:00:03.028) 0:00:03.045 ********** ok: [managed-node2] => { "changed": false, "stat": { "exists": false } } TASK [Skip if not supported] *************************************************** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:22 Saturday 24 May 2025 16:15:34 -0400 (0:00:00.432) 0:00:03.478 ********** META: end_host conditional evaluated to False, continuing execution for managed-node2 skipping: [managed-node2] => { "skip_reason": "end_host conditional evaluated to False, continuing execution for managed-node2" } MSG: end_host conditional evaluated to false, continuing execution for managed-node2 TASK [Save config] ************************************************************* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:26 Saturday 24 May 2025 16:15:34 -0400 (0:00:00.020) 0:00:03.499 ********** included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_config_save.yml for managed-node2 TASK [Backup original /etc/selinux/config] ************************************* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_config_save.yml:2 Saturday 24 May 2025 16:15:34 -0400 (0:00:00.015) 0:00:03.514 ********** changed: [managed-node2] => { "changed": true, "checksum": "63b3bcf02cd3b60e9782009ed3c2f0ff55936d06", "dest": "/etc/selinux/config.test_selinux_save", "gid": 0, "group": "root", "md5sum": "b8e9e38109f4c9718a49bdf8e5620d27", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:selinux_config_t:s0", "size": 1263, "src": "/etc/selinux/config", "state": "file", "uid": 0 } TASK [Test all the possible state transitions] ********************************* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:29 Saturday 24 May 2025 16:15:34 -0400 (0:00:00.433) 0:00:03.948 ********** included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['permissive', 'permissive']) included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['permissive', 'enforcing']) included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['permissive', 'disabled']) included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['enforcing', 'permissive']) included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['enforcing', 'enforcing']) included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['enforcing', 'disabled']) included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['disabled', 'permissive']) included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['disabled', 'enforcing']) included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml for managed-node2 => (item=['disabled', 'disabled']) TASK [Display transition name] ************************************************* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml:2 Saturday 24 May 2025 16:15:34 -0400 (0:00:00.109) 0:00:04.057 ********** ok: [managed-node2] => {} MSG: testing transition permissive -> permissive TASK [Setup the initial state] ************************************************* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml:6 Saturday 24 May 2025 16:15:34 -0400 (0:00:00.017) 0:00:04.075 ********** included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_apply_reboot.yml for managed-node2 TASK [Call SELinux role] ******************************************************* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_apply_reboot.yml:4 Saturday 24 May 2025 16:15:34 -0400 (0:00:00.019) 0:00:04.094 ********** redirecting (type: modules) ansible.builtin.selinux to ansible.posix.selinux redirecting (type: modules) ansible.builtin.selinux to ansible.posix.selinux redirecting (type: modules) ansible.builtin.seboolean to ansible.posix.seboolean included: fedora.linux_system_roles.selinux for managed-node2 TASK [fedora.linux_system_roles.selinux : Set ansible_facts required by role and install packages] *** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml:2 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.047) 0:00:04.142 ********** included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml for managed-node2 TASK [fedora.linux_system_roles.selinux : Ensure ansible_facts used by role] *** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:2 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.023) 0:00:04.165 ********** skipping: [managed-node2] => { "changed": false, "false_condition": "__selinux_required_facts | difference(ansible_facts.keys() | list) | length > 0", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Ensure SELinux packages] ************* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:7 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.034) 0:00:04.200 ********** included: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml for managed-node2 TASK [fedora.linux_system_roles.selinux : Check if system is ostree] *********** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.026) 0:00:04.226 ********** ok: [managed-node2] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.selinux : Set flag to indicate system is ostree] *** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.335) 0:00:04.562 ********** ok: [managed-node2] => { "ansible_facts": { "__selinux_is_ostree": false }, "changed": false } TASK [fedora.linux_system_roles.selinux : Check if transactional-update exists in /sbin] *** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.022) 0:00:04.584 ********** ok: [managed-node2] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.selinux : Set flag if transactional-update exists] *** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.334) 0:00:04.919 ********** ok: [managed-node2] => { "ansible_facts": { "__selinux_is_transactional": false }, "changed": false } TASK [fedora.linux_system_roles.selinux : Install SELinux python2 tools] ******* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.022) 0:00:04.941 ********** skipping: [managed-node2] => { "changed": false, "false_condition": "ansible_python_version is version('3', '<')", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Install SELinux python3 tools] ******* task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Saturday 24 May 2025 16:15:35 -0400 (0:00:00.016) 0:00:04.958 ********** fatal: [managed-node2]: FAILED! => { "changed": false, "rc": 1, "results": [] } MSG: Failed to download metadata for repo 'highavailability': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried TASK [Handle errors] *********************************************************** task path: /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_apply_reboot.yml:9 Saturday 24 May 2025 16:15:41 -0400 (0:00:05.730) 0:00:10.689 ********** fatal: [managed-node2]: FAILED! => {} MSG: The conditional check 'not selinux_reboot_required' failed. The error was: error while evaluating conditional (not selinux_reboot_required): 'selinux_reboot_required' is undefined The error appears to be in '/tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_apply_reboot.yml': line 9, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: # Fail if failed for a different reason than selinux_reboot_required. - name: Handle errors ^ here PLAY RECAP ********************************************************************* managed-node2 : ok=22 changed=1 unreachable=0 failed=1 skipped=2 rescued=1 ignored=0 SYSTEM ROLES ERRORS BEGIN v1 [ { "ansible_version": "2.17.12", "end_time": "2025-05-24T20:15:41.592401+00:00Z", "host": "managed-node2", "message": "Failed to download metadata for repo 'highavailability': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried", "rc": 1, "start_time": "2025-05-24T20:15:35.865980+00:00Z", "task_name": "Install SELinux python3 tools", "task_path": "/tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35" }, { "ansible_version": "2.17.12", "end_time": "2025-05-24T20:15:41.606898+00:00Z", "host": "managed-node2", "message": "The conditional check 'not selinux_reboot_required' failed. The error was: error while evaluating conditional (not selinux_reboot_required): 'selinux_reboot_required' is undefined\n\nThe error appears to be in '/tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_apply_reboot.yml': line 9, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n # Fail if failed for a different reason than selinux_reboot_required.\n - name: Handle errors\n ^ here\n", "start_time": "2025-05-24T20:15:41.596680+00:00Z", "task_name": "Handle errors", "task_path": "/tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_apply_reboot.yml:9" } ] SYSTEM ROLES ERRORS END v1 TASKS RECAP ******************************************************************** Saturday 24 May 2025 16:15:41 -0400 (0:00:00.011) 0:00:10.700 ********** =============================================================================== fedora.linux_system_roles.selinux : Install SELinux python3 tools ------- 5.73s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Gathering Facts --------------------------------------------------------- 3.03s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:2 Backup original /etc/selinux/config ------------------------------------- 0.43s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_config_save.yml:2 Check if system is ostree ----------------------------------------------- 0.43s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:17 fedora.linux_system_roles.selinux : Check if system is ostree ----------- 0.34s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 fedora.linux_system_roles.selinux : Check if transactional-update exists in /sbin --- 0.33s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Test all the possible state transitions --------------------------------- 0.11s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:29 Call SELinux role ------------------------------------------------------- 0.05s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_apply_reboot.yml:4 fedora.linux_system_roles.selinux : Ensure ansible_facts used by role --- 0.03s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:2 fedora.linux_system_roles.selinux : Ensure SELinux packages ------------- 0.03s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:7 fedora.linux_system_roles.selinux : Set ansible_facts required by role and install packages --- 0.02s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml:2 fedora.linux_system_roles.selinux : Set flag if transactional-update exists --- 0.02s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 fedora.linux_system_roles.selinux : Set flag to indicate system is ostree --- 0.02s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Skip if not supported --------------------------------------------------- 0.02s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:22 Setup the initial state ------------------------------------------------- 0.02s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml:6 Display transition name ------------------------------------------------- 0.02s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_test_transitions.yml:2 fedora.linux_system_roles.selinux : Install SELinux python2 tools ------- 0.02s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Save config ------------------------------------------------------------- 0.02s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_all_transitions.yml:26 Handle errors ----------------------------------------------------------- 0.01s /tmp/collections-Mf9/ansible_collections/fedora/linux_system_roles/tests/selinux/selinux_apply_reboot.yml:9