ansible-playbook 2.9.27 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.5 (default, Nov 14 2023, 16:14:06) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] Using /etc/ansible/ansible.cfg as config file [WARNING]: running playbook inside collection fedora.linux_system_roles Skipping callback 'actionable', as we already have a stdout callback. Skipping callback 'counter_enabled', as we already have a stdout callback. Skipping callback 'debug', as we already have a stdout callback. Skipping callback 'dense', as we already have a stdout callback. Skipping callback 'dense', as we already have a stdout callback. Skipping callback 'full_skip', 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 'minimal', as we already have a stdout callback. Skipping callback 'null', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. Skipping callback 'selective', as we already have a stdout callback. Skipping callback 'skippy', as we already have a stdout callback. Skipping callback 'stderr', as we already have a stdout callback. Skipping callback 'unixy', as we already have a stdout callback. Skipping callback 'yaml', as we already have a stdout callback. PLAYBOOK: tests_selinux_disabled.yml ******************************************* 1 plays in /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml PLAY [Ensure the default is targeted, enforcing, without local modifications] *** TASK [Gathering Facts] ********************************************************* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:2 Friday 30 May 2025 10:41:28 -0400 (0:00:00.025) 0:00:00.025 ************ ok: [managed-node1] META: ran handlers TASK [Ensure SELinux test packages] ******************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:16 Friday 30 May 2025 10:41:29 -0400 (0:00:00.858) 0:00:00.883 ************ included: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml for managed-node1 TASK [Ensure ansible_facts used by tests] ************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:12 Friday 30 May 2025 10:41:29 -0400 (0:00:00.050) 0:00:00.934 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure SELinux testing packages] ***************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:17 Friday 30 May 2025 10:41:29 -0400 (0:00:00.067) 0:00:01.001 ************ TASK [fedora.linux_system_roles.selinux : Check if system is ostree] *********** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Friday 30 May 2025 10:41:29 -0400 (0:00:00.084) 0:00:01.085 ************ ok: [managed-node1] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.selinux : Set flag to indicate system is ostree] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Friday 30 May 2025 10:41:30 -0400 (0:00:00.537) 0:00:01.623 ************ ok: [managed-node1] => { "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-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Friday 30 May 2025 10:41:30 -0400 (0:00:00.054) 0:00:01.677 ************ ok: [managed-node1] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.selinux : Set flag if transactional-update exists] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Friday 30 May 2025 10:41:30 -0400 (0:00:00.302) 0:00:01.980 ************ ok: [managed-node1] => { "ansible_facts": { "__selinux_is_transactional": false }, "changed": false } TASK [fedora.linux_system_roles.selinux : Install SELinux python2 tools] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Friday 30 May 2025 10:41:30 -0400 (0:00:00.099) 0:00:02.079 ************ ok: [managed-node1] => { "changed": false, "rc": 0, "results": [ "libselinux-python-2.5-15.el7.x86_64 providing libselinux-python is already installed", "policycoreutils-python-2.5-34.el7.x86_64 providing policycoreutils-python is already installed" ] } TASK [fedora.linux_system_roles.selinux : Install SELinux python3 tools] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Friday 30 May 2025 10:41:31 -0400 (0:00:00.931) 0:00:03.011 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Install SELinux python3 tools] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:46 Friday 30 May 2025 10:41:31 -0400 (0:00:00.042) 0:00:03.054 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Ensure grubby used to modify selinux kernel parameter] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:58 Friday 30 May 2025 10:41:31 -0400 (0:00:00.043) 0:00:03.098 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Install SELinux tool semanage] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:67 Friday 30 May 2025 10:41:31 -0400 (0:00:00.047) 0:00:03.145 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Notify user that reboot is needed to apply changes] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:81 Friday 30 May 2025 10:41:31 -0400 (0:00:00.044) 0:00:03.190 ************ skipping: [managed-node1] => {} TASK [fedora.linux_system_roles.selinux : Reboot transactional update systems] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:86 Friday 30 May 2025 10:41:31 -0400 (0:00:00.043) 0:00:03.234 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Fail if reboot is needed and not set] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:91 Friday 30 May 2025 10:41:32 -0400 (0:00:00.048) 0:00:03.282 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Refresh facts] *********************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:98 Friday 30 May 2025 10:41:32 -0400 (0:00:00.062) 0:00:03.345 ************ ok: [managed-node1] TASK [Ensure selinux-policy-targeted] ****************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:22 Friday 30 May 2025 10:41:32 -0400 (0:00:00.569) 0:00:03.915 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure findmnt] ********************************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:29 Friday 30 May 2025 10:41:32 -0400 (0:00:00.043) 0:00:03.958 ************ ok: [managed-node1] => { "changed": false, "rc": 0, "results": [ "util-linux-2.23.2-65.el7_9.1.x86_64 providing util-linux is already installed" ] } TASK [Set is_el6 flag] ********************************************************* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:38 Friday 30 May 2025 10:41:33 -0400 (0:00:00.632) 0:00:04.591 ************ ok: [managed-node1] => { "ansible_facts": { "__selinux_is_el6": false }, "changed": false } TASK [Get local modifications - boolean] *************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:46 Friday 30 May 2025 10:41:33 -0400 (0:00:00.070) 0:00:04.661 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - port] ****************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:51 Friday 30 May 2025 10:41:33 -0400 (0:00:00.062) 0:00:04.724 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - login] ***************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:56 Friday 30 May 2025 10:41:33 -0400 (0:00:00.051) 0:00:04.775 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - fcontext] ************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:61 Friday 30 May 2025 10:41:33 -0400 (0:00:00.057) 0:00:04.833 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Add a Linux System Roles SELinux User] *********************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:23 Friday 30 May 2025 10:41:33 -0400 (0:00:00.052) 0:00:04.885 ************ changed: [managed-node1] => { "changed": true, "comment": "Linux System Roles SELinux User", "create_home": true, "group": 1000, "home": "/home/sar-user", "name": "sar-user", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1000 } STDERR: useradd: warning: the home directory already exists. Not copying any file from skel directory into it. Creating mailbox file: File exists TASK [Add some mapping] ******************************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:27 Friday 30 May 2025 10:41:34 -0400 (0:00:00.559) 0:00:05.445 ************ ok: [managed-node1] => { "changed": false, "cmd": "set -euo pipefail\necho -e -n \"boolean -m --on samba_enable_home_dirs\nport -a -p tcp -t ssh_port_t 22100\nfcontext -a -t user_home_dir_t /tmp/test_dir\nlogin -a -s staff_u sar-user\n\" | /usr/sbin/semanage -i -", "delta": "0:00:02.431394", "end": "2025-05-30 10:41:37.052873", "rc": 0, "start": "2025-05-30 10:41:34.621479" } TASK [Backup original /etc/selinux/config] ************************************* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:32 Friday 30 May 2025 10:41:37 -0400 (0:00:02.925) 0:00:08.371 ************ changed: [managed-node1] => { "changed": true, "checksum": "fe4ed0aa93618472e1004b6f68ae1b0733485fc5", "dest": "/etc/selinux/config.test_selinux_disabled", "gid": 0, "group": "root", "md5sum": "ff8d2663b88f1a20c8489fdf152e6b31", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:selinux_config_t:s0", "size": 542, "src": "/etc/selinux/config", "state": "file", "uid": 0 } TASK [Upload testing /etc/selinux/config] ************************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:38 Friday 30 May 2025 10:41:37 -0400 (0:00:00.524) 0:00:08.895 ************ changed: [managed-node1] => { "changed": true, "checksum": "385caf4e178c9a1dfcdaac71738934c735201480", "dest": "/etc/selinux/config", "gid": 0, "group": "root", "md5sum": "293160d55f3a26d5bc687154d028eb47", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:selinux_config_t:s0", "size": 547, "src": "/root/.ansible/tmp/ansible-tmp-1748616097.69-16787-138056389471432/source", "state": "file", "uid": 0 } TASK [Switch to permissive to allow login when selinuxfs is not mounted] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:43 Friday 30 May 2025 10:41:38 -0400 (0:00:00.536) 0:00:09.432 ************ ok: [managed-node1] => { "changed": false, "cmd": [ "setenforce", "0" ], "delta": "0:00:00.003499", "end": "2025-05-30 10:41:38.428433", "rc": 0, "start": "2025-05-30 10:41:38.424934" } TASK [Get selinuxfs mountpoint] ************************************************ task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:47 Friday 30 May 2025 10:41:38 -0400 (0:00:00.306) 0:00:09.738 ************ ok: [managed-node1] => { "changed": false, "cmd": [ "findmnt", "-n", "-t", "selinuxfs", "--output=target" ], "delta": "0:00:00.004103", "end": "2025-05-30 10:41:38.760570", "rc": 0, "start": "2025-05-30 10:41:38.756467" } STDOUT: /sys/fs/selinux TASK [Umount selinux mountpoint to emulate SELinux disabled system /sys/fs/selinux] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:51 Friday 30 May 2025 10:41:38 -0400 (0:00:00.362) 0:00:10.101 ************ ok: [managed-node1] => { "changed": false, "cmd": [ "umount", "-l", "/sys/fs/selinux" ], "delta": "0:00:00.009629", "end": "2025-05-30 10:41:39.107285", "rc": 0, "start": "2025-05-30 10:41:39.097656" } TASK [Include role] ************************************************************ task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:59 Friday 30 May 2025 10:41:39 -0400 (0:00:00.300) 0:00:10.402 ************ TASK [fedora.linux_system_roles.selinux : Set ansible_facts required by role and install packages] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml:2 Friday 30 May 2025 10:41:39 -0400 (0:00:00.058) 0:00:10.461 ************ included: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml for managed-node1 TASK [fedora.linux_system_roles.selinux : Ensure ansible_facts used by role] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:2 Friday 30 May 2025 10:41:39 -0400 (0:00:00.028) 0:00:10.489 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Ensure SELinux packages] ************* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:7 Friday 30 May 2025 10:41:39 -0400 (0:00:00.024) 0:00:10.513 ************ included: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml for managed-node1 TASK [fedora.linux_system_roles.selinux : Check if system is ostree] *********** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Friday 30 May 2025 10:41:39 -0400 (0:00:00.039) 0:00:10.553 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Set flag to indicate system is ostree] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Friday 30 May 2025 10:41:39 -0400 (0:00:00.022) 0:00:10.576 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Check if transactional-update exists in /sbin] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Friday 30 May 2025 10:41:39 -0400 (0:00:00.022) 0:00:10.598 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Set flag if transactional-update exists] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Friday 30 May 2025 10:41:39 -0400 (0:00:00.024) 0:00:10.622 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Install SELinux python2 tools] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Friday 30 May 2025 10:41:39 -0400 (0:00:00.021) 0:00:10.644 ************ ok: [managed-node1] => { "changed": false, "rc": 0, "results": [ "libselinux-python-2.5-15.el7.x86_64 providing libselinux-python is already installed", "policycoreutils-python-2.5-34.el7.x86_64 providing policycoreutils-python is already installed" ] } TASK [fedora.linux_system_roles.selinux : Install SELinux python3 tools] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Friday 30 May 2025 10:41:39 -0400 (0:00:00.567) 0:00:11.212 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Install SELinux python3 tools] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:46 Friday 30 May 2025 10:41:39 -0400 (0:00:00.023) 0:00:11.235 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Ensure grubby used to modify selinux kernel parameter] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:58 Friday 30 May 2025 10:41:40 -0400 (0:00:00.024) 0:00:11.260 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Install SELinux tool semanage] ******* task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:67 Friday 30 May 2025 10:41:40 -0400 (0:00:00.026) 0:00:11.287 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Notify user that reboot is needed to apply changes] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:81 Friday 30 May 2025 10:41:40 -0400 (0:00:00.023) 0:00:11.310 ************ skipping: [managed-node1] => {} TASK [fedora.linux_system_roles.selinux : Reboot transactional update systems] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:86 Friday 30 May 2025 10:41:40 -0400 (0:00:00.022) 0:00:11.333 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Fail if reboot is needed and not set] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:91 Friday 30 May 2025 10:41:40 -0400 (0:00:00.023) 0:00:11.357 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Refresh facts] *********************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:98 Friday 30 May 2025 10:41:40 -0400 (0:00:00.021) 0:00:11.378 ************ ok: [managed-node1] TASK [fedora.linux_system_roles.selinux : Set permanent SELinux state if enabled] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml:9 Friday 30 May 2025 10:41:40 -0400 (0:00:00.489) 0:00:11.868 ************ skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Set permanent SELinux state if disabled] *** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml:20 Friday 30 May 2025 10:41:40 -0400 (0:00:00.021) 0:00:11.889 ************ [DEPRECATION WARNING]: evaluating u'selinux_state' as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. fatal: [managed-node1]: FAILED! => {} MSG: The conditional check 'selinux_state' failed. The error was: error while evaluating conditional (selinux_state): 'enforcing' is undefined The error appears to be in '/tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml': line 20, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Set permanent SELinux state if disabled ^ here TASK [Examine the selinux_reboot_required variable] **************************** task path: /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:63 Friday 30 May 2025 10:41:40 -0400 (0:00:00.026) 0:00:11.916 ************ fatal: [managed-node1]: FAILED! => {} MSG: The task includes an option with an undefined variable. The error was: 'selinux_reboot_required' is undefined The error appears to be in '/tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml': line 63, column 11, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: rescue: - name: Examine the selinux_reboot_required variable ^ here PLAY RECAP ********************************************************************* managed-node1 : ok=21 changed=3 unreachable=0 failed=1 skipped=26 rescued=1 ignored=0 SYSTEM ROLES ERRORS BEGIN v1 [ { "ansible_version": "2.9.27", "end_time": "2025-05-30T14:41:40.658608Z", "host": "managed-node1", "message": "The conditional check 'selinux_state' failed. The error was: error while evaluating conditional (selinux_state): 'enforcing' is undefined\n\nThe error appears to be in '/tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml': line 20, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Set permanent SELinux state if disabled\n ^ here\n", "start_time": "2025-05-30T14:41:40.639072Z", "task_name": "Set permanent SELinux state if disabled", "task_path": "/tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml:20" }, { "ansible_version": "2.9.27", "end_time": "2025-05-30T14:41:40.679179Z", "host": "managed-node1", "message": "The task includes an option with an undefined variable. The error was: 'selinux_reboot_required' is undefined\n\nThe error appears to be in '/tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml': line 63, column 11, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n rescue:\n - name: Examine the selinux_reboot_required variable\n ^ here\n", "start_time": "2025-05-30T14:41:40.665744Z", "task_name": "Examine the selinux_reboot_required variable", "task_path": "/tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:63" } ] SYSTEM ROLES ERRORS END v1 TASKS RECAP ******************************************************************** Friday 30 May 2025 10:41:40 -0400 (0:00:00.014) 0:00:11.931 ************ =============================================================================== Add some mapping -------------------------------------------------------- 2.93s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:27 fedora.linux_system_roles.selinux : Install SELinux python2 tools ------- 0.93s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Gathering Facts --------------------------------------------------------- 0.86s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:2 Ensure findmnt ---------------------------------------------------------- 0.63s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:29 fedora.linux_system_roles.selinux : Refresh facts ----------------------- 0.57s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:98 fedora.linux_system_roles.selinux : Install SELinux python2 tools ------- 0.57s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Add a Linux System Roles SELinux User ----------------------------------- 0.56s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:23 fedora.linux_system_roles.selinux : Check if system is ostree ----------- 0.54s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Upload testing /etc/selinux/config -------------------------------------- 0.54s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:38 Backup original /etc/selinux/config ------------------------------------- 0.52s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:32 fedora.linux_system_roles.selinux : Refresh facts ----------------------- 0.49s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:98 Get selinuxfs mountpoint ------------------------------------------------ 0.36s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:47 Switch to permissive to allow login when selinuxfs is not mounted ------- 0.31s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:43 fedora.linux_system_roles.selinux : Check if transactional-update exists in /sbin --- 0.30s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Umount selinux mountpoint to emulate SELinux disabled system /sys/fs/selinux --- 0.30s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:51 fedora.linux_system_roles.selinux : Set flag if transactional-update exists --- 0.10s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Ensure SELinux testing packages ----------------------------------------- 0.08s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:17 Set is_el6 flag --------------------------------------------------------- 0.07s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:38 Ensure ansible_facts used by tests -------------------------------------- 0.07s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:12 Get local modifications - boolean --------------------------------------- 0.06s /tmp/collections-zOy/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:46