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 '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-qt4/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-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:2 Friday 30 May 2025 10:42:50 -0400 (0:00:00.029) 0:00:00.029 ************ ok: [managed-node2] META: ran handlers TASK [Ensure SELinux test packages] ******************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:16 Friday 30 May 2025 10:42:51 -0400 (0:00:01.042) 0:00:01.071 ************ included: /tmp/collections-qt4/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-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:12 Friday 30 May 2025 10:42:51 -0400 (0:00:00.021) 0:00:01.093 ************ skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure SELinux testing packages] ***************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:17 Friday 30 May 2025 10:42:51 -0400 (0:00:00.035) 0:00:01.128 ************ TASK [fedora.linux_system_roles.selinux : Check if system is ostree] *********** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Friday 30 May 2025 10:42:51 -0400 (0:00:00.034) 0:00:01.162 ************ 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-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Friday 30 May 2025 10:42:51 -0400 (0:00:00.448) 0:00:01.611 ************ 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-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Friday 30 May 2025 10:42:51 -0400 (0:00:00.038) 0:00:01.650 ************ ok: [managed-node2] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.selinux : Set flag if transactional-update exists] *** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Friday 30 May 2025 10:42:52 -0400 (0:00:00.355) 0:00:02.005 ************ 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-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Friday 30 May 2025 10:42:52 -0400 (0:00:00.040) 0:00:02.045 ************ 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-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Friday 30 May 2025 10:42:52 -0400 (0:00:00.034) 0:00:02.080 ************ ok: [managed-node2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.selinux : Install SELinux python3 tools] ******* task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:46 Friday 30 May 2025 10:42:55 -0400 (0:00:03.010) 0:00:05.090 ************ 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-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:58 Friday 30 May 2025 10:42:55 -0400 (0:00:00.036) 0:00:05.127 ************ ok: [managed-node2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.selinux : Install SELinux tool semanage] ******* task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:67 Friday 30 May 2025 10:42:58 -0400 (0:00:02.917) 0:00:08.045 ************ ok: [managed-node2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [fedora.linux_system_roles.selinux : Notify user that reboot is needed to apply changes] *** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:81 Friday 30 May 2025 10:43:01 -0400 (0:00:02.978) 0:00:11.024 ************ skipping: [managed-node2] => {} TASK [fedora.linux_system_roles.selinux : Reboot transactional update systems] *** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:86 Friday 30 May 2025 10:43:01 -0400 (0:00:00.051) 0:00:11.076 ************ 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-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:91 Friday 30 May 2025 10:43:01 -0400 (0:00:00.052) 0:00:11.128 ************ skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Refresh facts] *********************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:98 Friday 30 May 2025 10:43:01 -0400 (0:00:00.054) 0:00:11.182 ************ ok: [managed-node2] TASK [Ensure selinux-policy-targeted] ****************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:22 Friday 30 May 2025 10:43:01 -0400 (0:00:00.663) 0:00:11.846 ************ skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure findmnt] ********************************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:29 Friday 30 May 2025 10:43:02 -0400 (0:00:00.034) 0:00:11.880 ************ ok: [managed-node2] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [Set is_el6 flag] ********************************************************* task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:38 Friday 30 May 2025 10:43:04 -0400 (0:00:02.894) 0:00:14.774 ************ ok: [managed-node2] => { "ansible_facts": { "__selinux_is_el6": false }, "changed": false } TASK [Get local modifications - boolean] *************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:46 Friday 30 May 2025 10:43:04 -0400 (0:00:00.039) 0:00:14.814 ************ skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - port] ****************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:51 Friday 30 May 2025 10:43:04 -0400 (0:00:00.034) 0:00:14.848 ************ skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - login] ***************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:56 Friday 30 May 2025 10:43:05 -0400 (0:00:00.033) 0:00:14.882 ************ skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get local modifications - fcontext] ************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:61 Friday 30 May 2025 10:43:05 -0400 (0:00:00.033) 0:00:14.916 ************ skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Add a Linux System Roles SELinux User] *********************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:23 Friday 30 May 2025 10:43:05 -0400 (0:00:00.035) 0:00:14.951 ************ ok: [managed-node2] => { "append": false, "changed": false, "comment": "Linux System Roles SELinux User", "group": 1000, "home": "/home/sar-user", "move_home": false, "name": "sar-user", "shell": "/bin/bash", "state": "present", "uid": 1000 } TASK [Add some mapping] ******************************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:27 Friday 30 May 2025 10:43:05 -0400 (0:00:00.504) 0:00:15.456 ************ ok: [managed-node2] => { "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:01.832646", "end": "2025-05-30 10:43:07.817310", "rc": 0, "start": "2025-05-30 10:43:05.984664" } STDOUT: Port tcp/22100 already defined, modifying instead Login mapping for sar-user is already defined, modifying instead TASK [Backup original /etc/selinux/config] ************************************* task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:32 Friday 30 May 2025 10:43:07 -0400 (0:00:02.290) 0:00:17.747 ************ changed: [managed-node2] => { "changed": true, "checksum": "385caf4e178c9a1dfcdaac71738934c735201480", "dest": "/etc/selinux/config.test_selinux_disabled", "gid": 0, "group": "root", "md5sum": "293160d55f3a26d5bc687154d028eb47", "mode": "0644", "owner": "root", "size": 547, "src": "/etc/selinux/config", "state": "file", "uid": 0 } TASK [Upload testing /etc/selinux/config] ************************************** task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:38 Friday 30 May 2025 10:43:08 -0400 (0:00:00.498) 0:00:18.245 ************ ok: [managed-node2] => { "changed": false, "checksum": "385caf4e178c9a1dfcdaac71738934c735201480", "dest": "/etc/selinux/config", "gid": 0, "group": "root", "mode": "0644", "owner": "root", "path": "/etc/selinux/config", "size": 547, "state": "file", "uid": 0 } TASK [Switch to permissive to allow login when selinuxfs is not mounted] ******* task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:43 Friday 30 May 2025 10:43:09 -0400 (0:00:00.689) 0:00:18.935 ************ skipping: [managed-node2] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Get selinuxfs mountpoint] ************************************************ task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:47 Friday 30 May 2025 10:43:09 -0400 (0:00:00.040) 0:00:18.975 ************ ok: [managed-node2] => { "changed": false, "cmd": [ "findmnt", "-n", "-t", "selinuxfs", "--output=target" ], "delta": "0:00:00.003797", "end": "2025-05-30 10:43:09.393801", "rc": 0, "start": "2025-05-30 10:43:09.390004" } TASK [Umount selinux mountpoint to emulate SELinux disabled system] ************ task path: /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:51 Friday 30 May 2025 10:43:09 -0400 (0:00:00.354) 0:00:19.330 ************ fatal: [managed-node2]: FAILED! => { "changed": false, "cmd": [ "umount", "-l" ], "delta": "0:00:00.004809", "end": "2025-05-30 10:43:09.750590", "rc": 1, "start": "2025-05-30 10:43:09.745781" } STDERR: umount: bad usage Try 'umount --help' for more information. MSG: non-zero return code PLAY RECAP ********************************************************************* managed-node2 : ok=17 changed=1 unreachable=0 failed=1 skipped=12 rescued=0 ignored=0 SYSTEM ROLES ERRORS BEGIN v1 [ { "ansible_version": "2.9.27", "delta": "0:00:00.004809", "end_time": "2025-05-30 10:43:09.750590", "host": "managed-node2", "message": "non-zero return code", "rc": 1, "start_time": "2025-05-30 10:43:09.745781", "stderr": "umount: bad usage\nTry 'umount --help' for more information.", "task_name": "Umount selinux mountpoint to emulate SELinux disabled system ", "task_path": "/tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:51" } ] SYSTEM ROLES ERRORS END v1 TASKS RECAP ******************************************************************** Friday 30 May 2025 10:43:09 -0400 (0:00:00.332) 0:00:19.663 ************ =============================================================================== fedora.linux_system_roles.selinux : Install SELinux python3 tools ------- 3.01s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 fedora.linux_system_roles.selinux : Install SELinux tool semanage ------- 2.98s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:67 fedora.linux_system_roles.selinux : Ensure grubby used to modify selinux kernel parameter --- 2.92s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:58 Ensure findmnt ---------------------------------------------------------- 2.89s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:29 Add some mapping -------------------------------------------------------- 2.29s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:27 Gathering Facts --------------------------------------------------------- 1.04s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:2 Upload testing /etc/selinux/config -------------------------------------- 0.69s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:38 fedora.linux_system_roles.selinux : Refresh facts ----------------------- 0.66s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:98 Add a Linux System Roles SELinux User ----------------------------------- 0.50s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:23 Backup original /etc/selinux/config ------------------------------------- 0.50s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:32 fedora.linux_system_roles.selinux : Check if system is ostree ----------- 0.45s /tmp/collections-qt4/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.36s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Get selinuxfs mountpoint ------------------------------------------------ 0.35s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:47 Umount selinux mountpoint to emulate SELinux disabled system ----------- 0.33s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:51 fedora.linux_system_roles.selinux : Fail if reboot is needed and not set --- 0.05s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:91 fedora.linux_system_roles.selinux : Reboot transactional update systems --- 0.05s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:86 fedora.linux_system_roles.selinux : Notify user that reboot is needed to apply changes --- 0.05s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:81 Switch to permissive to allow login when selinuxfs is not mounted ------- 0.04s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_selinux_disabled.yml:43 fedora.linux_system_roles.selinux : Set flag if transactional-update exists --- 0.04s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Set is_el6 flag --------------------------------------------------------- 0.04s /tmp/collections-qt4/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:38