ansible-playbook 2.9.27 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.9/site-packages/ansible executable location = /usr/local/bin/ansible-playbook python version = 3.9.19 (main, May 16 2024, 11:40:09) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)] No config file found; using defaults [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 '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-Grq/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-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:2 Saturday 28 June 2025 16:19:03 -0400 (0:00:00.021) 0:00:00.021 ********* ok: [managed-node2] META: ran handlers TASK [Ensure SELinux test packages] ******************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:19 Saturday 28 June 2025 16:19:04 -0400 (0:00:00.868) 0:00:00.890 ********* included: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml for managed-node2 TASK [Ensure ansible_facts used by tests] ************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:12 Saturday 28 June 2025 16:19:04 -0400 (0:00:00.021) 0:00:00.912 ********* skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure SELinux testing packages] ***************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:17 Saturday 28 June 2025 16:19:04 -0400 (0:00:00.036) 0:00:00.948 ********* TASK [fedora.linux_system_roles.selinux : Check if system is ostree] *********** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Saturday 28 June 2025 16:19:04 -0400 (0:00:00.035) 0:00:00.984 ********* 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-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Saturday 28 June 2025 16:19:04 -0400 (0:00:00.452) 0:00:01.436 ********* 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-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Saturday 28 June 2025 16:19:04 -0400 (0:00:00.059) 0:00:01.496 ********* ok: [managed-node2] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.selinux : Set flag if transactional-update exists] *** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Saturday 28 June 2025 16:19:05 -0400 (0:00:00.379) 0:00:01.875 ********* 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-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Saturday 28 June 2025 16:19:05 -0400 (0:00:00.038) 0:00:01.914 ********* skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Install SELinux python3 tools] ******* task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Saturday 28 June 2025 16:19:05 -0400 (0:00:00.036) 0:00:01.950 ********* ok: [managed-node2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do lsrpackages: python3-libselinux python3-policycoreutils TASK [fedora.linux_system_roles.selinux : Install SELinux python3 tools] ******* task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:46 Saturday 28 June 2025 16:19:08 -0400 (0:00:03.001) 0:00:04.952 ********* skipping: [managed-node2] => { "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-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:58 Saturday 28 June 2025 16:19:08 -0400 (0:00:00.036) 0:00:04.989 ********* ok: [managed-node2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do lsrpackages: grubby TASK [fedora.linux_system_roles.selinux : Install SELinux tool semanage] ******* task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:67 Saturday 28 June 2025 16:19:11 -0400 (0:00:02.846) 0:00:07.836 ********* ok: [managed-node2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do lsrpackages: policycoreutils-python-utils TASK [fedora.linux_system_roles.selinux : Notify user that reboot is needed to apply changes] *** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:81 Saturday 28 June 2025 16:19:13 -0400 (0:00:02.910) 0:00:10.746 ********* skipping: [managed-node2] => {} TASK [fedora.linux_system_roles.selinux : Reboot transactional update systems] *** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:86 Saturday 28 June 2025 16:19:13 -0400 (0:00:00.040) 0:00:10.787 ********* skipping: [managed-node2] => { "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-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:91 Saturday 28 June 2025 16:19:14 -0400 (0:00:00.034) 0:00:10.822 ********* skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Refresh facts] *********************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:98 Saturday 28 June 2025 16:19:14 -0400 (0:00:00.033) 0:00:10.856 ********* ok: [managed-node2] TASK [Ensure selinux-policy-targeted] ****************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:22 Saturday 28 June 2025 16:19:14 -0400 (0:00:00.609) 0:00:11.466 ********* skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure findmnt] ********************************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:29 Saturday 28 June 2025 16:19:14 -0400 (0:00:00.042) 0:00:11.508 ********* ok: [managed-node2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do lsrpackages: util-linux TASK [Set is_el6 flag] ********************************************************* task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:38 Saturday 28 June 2025 16:19:17 -0400 (0:00:02.893) 0:00:14.401 ********* ok: [managed-node2] => { "ansible_facts": { "__selinux_is_el6": false }, "changed": false } TASK [Get local modifications - boolean] *************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:46 Saturday 28 June 2025 16:19:17 -0400 (0:00:00.037) 0:00:14.439 ********* skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - port] ****************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:51 Saturday 28 June 2025 16:19:17 -0400 (0:00:00.032) 0:00:14.472 ********* skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - login] ***************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:56 Saturday 28 June 2025 16:19:17 -0400 (0:00:00.033) 0:00:14.505 ********* skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - fcontext] ************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:61 Saturday 28 June 2025 16:19:17 -0400 (0:00:00.033) 0:00:14.538 ********* skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Add a Linux System Roles SELinux User] *********************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:26 Saturday 28 June 2025 16:19:17 -0400 (0:00:00.033) 0:00:14.572 ********* changed: [managed-node2] => { "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 } TASK [Add some mapping] ******************************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:30 Saturday 28 June 2025 16:19:18 -0400 (0:00:00.576) 0:00:15.149 ********* ok: [managed-node2] => { "changed": false, "cmd": "set -euo pipefail\necho -e -n \"boolean -m --on daemons_use_tcp_wrapper\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.682673", "end": "2025-06-28 16:19:21.415123", "rc": 0, "start": "2025-06-28 16:19:18.732450" } TASK [Backup original /etc/selinux/config] ************************************* task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:35 Saturday 28 June 2025 16:19:21 -0400 (0:00:03.124) 0:00:18.273 ********* changed: [managed-node2] => { "changed": true, "checksum": "61a40e1faa78b234462d16dffbdb3fb869442406", "dest": "/etc/selinux/config.test_selinux_disabled", "gid": 0, "group": "root", "md5sum": "eab350e0c5241d4394c2099bf86e9312", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:selinux_config_t:s0", "size": 548, "src": "/etc/selinux/config", "state": "file", "uid": 0 } TASK [Upload testing /etc/selinux/config] ************************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:41 Saturday 28 June 2025 16:19:21 -0400 (0:00:00.441) 0:00:18.715 ********* changed: [managed-node2] => { "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-1751141961.9428778-10926-194750295308516/source", "state": "file", "uid": 0 } TASK [Switch to permissive to allow login when selinuxfs is not mounted] ******* task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:46 Saturday 28 June 2025 16:19:22 -0400 (0:00:00.623) 0:00:19.339 ********* ok: [managed-node2] => { "changed": false, "cmd": [ "setenforce", "0" ], "delta": "0:00:00.003415", "end": "2025-06-28 16:19:22.834463", "rc": 0, "start": "2025-06-28 16:19:22.831048" } TASK [Get selinuxfs mountpoint] ************************************************ task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:50 Saturday 28 June 2025 16:19:22 -0400 (0:00:00.347) 0:00:19.686 ********* ok: [managed-node2] => { "changed": false, "cmd": [ "findmnt", "-n", "-t", "selinuxfs", "--output=target" ], "delta": "0:00:00.003853", "end": "2025-06-28 16:19:23.159771", "rc": 0, "start": "2025-06-28 16:19:23.155918" } STDOUT: /sys/fs/selinux TASK [Umount selinux mountpoint to emulate SELinux disabled system /sys/fs/selinux] *** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:54 Saturday 28 June 2025 16:19:23 -0400 (0:00:00.344) 0:00:20.031 ********* ok: [managed-node2] => { "changed": false, "cmd": [ "umount", "-l", "/sys/fs/selinux" ], "delta": "0:00:00.008850", "end": "2025-06-28 16:19:23.508911", "rc": 0, "start": "2025-06-28 16:19:23.500061" } TASK [Include role] ************************************************************ task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:62 Saturday 28 June 2025 16:19:23 -0400 (0:00:00.328) 0:00:20.360 ********* ERROR! couldn't resolve module/action 'community.general.sefcontext'. This often indicates a misspelling, missing collection, or incorrect module path. The error appears to be in '/tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml': line 121, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Set SELinux file contexts ^ here TASK [Examine the selinux_reboot_required variable] **************************** task path: /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:66 Saturday 28 June 2025 16:19:23 -0400 (0:00:00.028) 0:00:20.388 ********* fatal: [managed-node2]: 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-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml': line 66, 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-node2 : ok=19 changed=3 unreachable=0 failed=1 skipped=11 rescued=0 ignored=0 SYSTEM ROLES ERRORS BEGIN v1 [ { "ansible_version": "2.9.27", "end_time": "2025-06-28T20:19:23.592070+00:00Z", "host": "managed-node2", "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-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml': line 66, 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-06-28T20:19:23.582820+00:00Z", "task_name": "Examine the selinux_reboot_required variable", "task_path": "/tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:66" } ] SYSTEM ROLES ERRORS END v1 TASKS RECAP ******************************************************************** Saturday 28 June 2025 16:19:23 -0400 (0:00:00.010) 0:00:20.399 ********* =============================================================================== Add some mapping -------------------------------------------------------- 3.12s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:30 fedora.linux_system_roles.selinux : Install SELinux python3 tools ------- 3.00s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 fedora.linux_system_roles.selinux : Install SELinux tool semanage ------- 2.91s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:67 Ensure findmnt ---------------------------------------------------------- 2.89s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:29 fedora.linux_system_roles.selinux : Ensure grubby used to modify selinux kernel parameter --- 2.85s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:58 Gathering Facts --------------------------------------------------------- 0.87s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:2 Upload testing /etc/selinux/config -------------------------------------- 0.62s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:41 fedora.linux_system_roles.selinux : Refresh facts ----------------------- 0.61s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:98 Add a Linux System Roles SELinux User ----------------------------------- 0.58s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:26 fedora.linux_system_roles.selinux : Check if system is ostree ----------- 0.45s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Backup original /etc/selinux/config ------------------------------------- 0.44s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:35 fedora.linux_system_roles.selinux : Check if transactional-update exists in /sbin --- 0.38s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Switch to permissive to allow login when selinuxfs is not mounted ------- 0.35s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:46 Get selinuxfs mountpoint ------------------------------------------------ 0.34s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:50 Umount selinux mountpoint to emulate SELinux disabled system /sys/fs/selinux --- 0.33s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:54 fedora.linux_system_roles.selinux : Set flag to indicate system is ostree --- 0.06s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Ensure selinux-policy-targeted ------------------------------------------ 0.04s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:22 fedora.linux_system_roles.selinux : Notify user that reboot is needed to apply changes --- 0.04s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:81 fedora.linux_system_roles.selinux : Set flag if transactional-update exists --- 0.04s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Set is_el6 flag --------------------------------------------------------- 0.04s /tmp/collections-Grq/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:38