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 statically imported: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml statically imported: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml statically imported: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml statically imported: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml statically imported: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml 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_fcontext.yml *************************************************** 1 plays in /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_fcontext.yml PLAY [Check if selinux role sets SELinux fcontext mappings] ******************** [WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin (): 'Play' object has no attribute 'get_path' META: ran handlers TASK [Ensure ansible_facts used by tests] ************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:12 Wednesday 21 May 2025 17:57:00 -0400 (0:00:00.024) 0:00:00.024 ********* [WARNING]: Failure using method (v2_runner_on_start) in callback plugin (): 'module' object has no attribute 'timezone' ok: [managed-node1] TASK [Ensure SELinux testing packages] ***************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:17 Wednesday 21 May 2025 17:57:00 -0400 (0:00:00.609) 0:00:00.634 ********* TASK [fedora.linux_system_roles.selinux : Check if system is ostree] *********** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Wednesday 21 May 2025 17:57:00 -0400 (0:00:00.042) 0:00:00.677 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Wednesday 21 May 2025 17:57:01 -0400 (0:00:00.376) 0:00:01.053 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Wednesday 21 May 2025 17:57:01 -0400 (0:00:00.040) 0:00:01.093 ********* ok: [managed-node1] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.selinux : Set flag if transactional-update exists] *** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Wednesday 21 May 2025 17:57:01 -0400 (0:00:00.263) 0:00:01.357 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Wednesday 21 May 2025 17:57:01 -0400 (0:00:00.085) 0:00:01.442 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Wednesday 21 May 2025 17:57:02 -0400 (0:00:01.195) 0:00:02.637 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:46 Wednesday 21 May 2025 17:57:02 -0400 (0:00:00.043) 0:00:02.680 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:58 Wednesday 21 May 2025 17:57:02 -0400 (0:00:00.036) 0:00:02.717 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:65 Wednesday 21 May 2025 17:57:02 -0400 (0:00:00.038) 0:00:02.756 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:79 Wednesday 21 May 2025 17:57:02 -0400 (0:00:00.038) 0:00:02.795 ********* skipping: [managed-node1] => {} TASK [fedora.linux_system_roles.selinux : Reboot transactional update systems] *** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:84 Wednesday 21 May 2025 17:57:02 -0400 (0:00:00.037) 0:00:02.832 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:89 Wednesday 21 May 2025 17:57:03 -0400 (0:00:00.038) 0:00:02.871 ********* skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.selinux : Refresh facts] *********************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:96 Wednesday 21 May 2025 17:57:03 -0400 (0:00:00.038) 0:00:02.909 ********* ok: [managed-node1] TASK [Ensure selinux-policy-targeted] ****************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:22 Wednesday 21 May 2025 17:57:03 -0400 (0:00:00.513) 0:00:03.423 ********* skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Ensure findmnt] ********************************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:29 Wednesday 21 May 2025 17:57:03 -0400 (0:00:00.045) 0:00:03.468 ********* skipping: [managed-node1] => { "changed": false, "skip_reason": "Conditional result was False" } TASK [Set is_el6 flag] ********************************************************* task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:38 Wednesday 21 May 2025 17:57:03 -0400 (0:00:00.042) 0:00:03.510 ********* ok: [managed-node1] => { "ansible_facts": { "__selinux_is_el6": false }, "changed": false } TASK [Get local modifications - boolean] *************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:46 Wednesday 21 May 2025 17:57:03 -0400 (0:00:00.060) 0:00:03.571 ********* ok: [managed-node1] => { "changed": false, "cmd": [ "/usr/sbin/semanage", "boolean", "-l", "-n", "-C" ], "delta": "0:00:00.157100", "end": "2025-05-21 17:57:04.282770", "rc": 0, "start": "2025-05-21 17:57:04.125670" } STDOUT: samba_enable_home_dirs (on , on) Allow samba to enable home dirs TASK [Get local modifications - port] ****************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:51 Wednesday 21 May 2025 17:57:04 -0400 (0:00:00.596) 0:00:04.168 ********* ok: [managed-node1] => { "changed": false, "cmd": [ "/usr/sbin/semanage", "port", "-l", "-n", "-C" ], "delta": "0:00:00.154495", "end": "2025-05-21 17:57:04.739072", "rc": 0, "start": "2025-05-21 17:57:04.584577" } STDOUT: ssh_port_t tcp 22100 TASK [Get local modifications - login] ***************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:56 Wednesday 21 May 2025 17:57:04 -0400 (0:00:00.469) 0:00:04.637 ********* ok: [managed-node1] => { "changed": false, "cmd": [ "/usr/sbin/semanage", "login", "-l", "-n", "-C" ], "delta": "0:00:00.155677", "end": "2025-05-21 17:57:05.226139", "rc": 0, "start": "2025-05-21 17:57:05.070462" } STDOUT: sar-user staff_u s0-s0:c0.c1023 * TASK [Get local modifications - fcontext] ************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:61 Wednesday 21 May 2025 17:57:05 -0400 (0:00:00.471) 0:00:05.108 ********* ok: [managed-node1] => { "changed": false, "cmd": [ "/usr/sbin/semanage", "fcontext", "-l", "-n", "-C" ], "delta": "0:00:00.154535", "end": "2025-05-21 17:57:05.648849", "rc": 0, "start": "2025-05-21 17:57:05.494314" } STDOUT: /tmp/test_dir all files system_u:object_r:user_home_dir_t:s0 TASK [Unset facts used above] ************************************************** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:66 Wednesday 21 May 2025 17:57:05 -0400 (0:00:00.435) 0:00:05.543 ********* ok: [managed-node1] => { "ansible_facts": { "ansible_facts": { "architecture": "x86_64", "discovered_interpreter_python": "/usr/bin/python", "distribution_file_parsed": true, "distribution_file_path": "/etc/redhat-release", "distribution_file_variety": "RedHat", "distribution_release": "Core", "distribution_version": "7.9", "domain": "", "fqdn": "managed-node1", "gather_subset": [ "!all", "!min", "distribution", "distribution_major_version", "os_family", "python_version" ], "hostname": "managed-node1", "kernel": "3.10.0-1160.119.1.el7.x86_64", "kernel_version": "#1 SMP Tue Jun 4 14:43:51 UTC 2024", "machine": "x86_64", "machine_id": "e1cf5afad1fb473bb5b17b4c6f2cbde0", "module_setup": true, "nodename": "managed-node1", "selinux": { "config_mode": "enforcing", "mode": "enforcing", "policyvers": 31, "status": "enabled", "type": "targeted" }, "system": "Linux", "userspace_architecture": "x86_64", "userspace_bits": "64" } }, "changed": false } TASK [Initial changes] ********************************************************* task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_fcontext.yml:17 Wednesday 21 May 2025 17:57:05 -0400 (0:00:00.061) 0:00:05.605 ********* TASK [fedora.linux_system_roles.selinux : Set ansible_facts required by role and install packages] *** task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/main.yml:2 Wednesday 21 May 2025 17:57:05 -0400 (0:00:00.143) 0:00:05.748 ********* included: /tmp/collections-hr0/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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:2 Wednesday 21 May 2025 17:57:05 -0400 (0:00:00.040) 0:00:05.788 ********* ok: [managed-node1] TASK [fedora.linux_system_roles.selinux : Ensure SELinux packages] ************* task path: /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:7 Wednesday 21 May 2025 17:57:06 -0400 (0:00:00.371) 0:00:06.160 ********* included: /tmp/collections-hr0/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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 Wednesday 21 May 2025 17:57:06 -0400 (0:00:00.031) 0:00:06.192 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:10 Wednesday 21 May 2025 17:57:06 -0400 (0:00:00.036) 0:00:06.229 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Wednesday 21 May 2025 17:57:06 -0400 (0:00:00.036) 0:00:06.265 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Wednesday 21 May 2025 17:57:06 -0400 (0:00:00.039) 0:00:06.305 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Wednesday 21 May 2025 17:57:06 -0400 (0:00:00.049) 0:00:06.354 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Wednesday 21 May 2025 17:57:07 -0400 (0:00:00.895) 0:00:07.250 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:46 Wednesday 21 May 2025 17:57:07 -0400 (0:00:00.038) 0:00:07.288 ********* 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-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:58 Wednesday 21 May 2025 17:57:07 -0400 (0:00:00.038) 0:00:07.327 ********* fatal: [managed-node1]: FAILED! => {} MSG: The conditional check 'ansible_facts["os_family"] == "RedHat" and ansible_facts["distribution_major_version"] in ["8", "9"]' failed. The error was: error while evaluating conditional (ansible_facts["os_family"] == "RedHat" and ansible_facts["distribution_major_version"] in ["8", "9"]): 'dict object' has no attribute 'os_family' The error appears to be in '/tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml': line 58, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Ensure grubby used to modify selinux kernel parameter ^ here [WARNING]: Failure using method (v2_runner_on_failed) in callback plugin (): 'CallbackModule' object has no attribute '_current_task' PLAY RECAP ********************************************************************* managed-node1 : ok=17 changed=0 unreachable=0 failed=1 skipped=15 rescued=0 ignored=0 SYSTEM ROLES ERRORS BEGIN v1 [] SYSTEM ROLES ERRORS END v1 TASKS RECAP ******************************************************************** Wednesday 21 May 2025 17:57:07 -0400 (0:00:00.038) 0:00:07.365 ********* =============================================================================== fedora.linux_system_roles.selinux : Install SELinux python2 tools ------- 1.20s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 fedora.linux_system_roles.selinux : Install SELinux python2 tools ------- 0.90s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:26 Ensure ansible_facts used by tests -------------------------------------- 0.61s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:12 Get local modifications - boolean --------------------------------------- 0.60s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:46 fedora.linux_system_roles.selinux : Refresh facts ----------------------- 0.51s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:96 Get local modifications - login ----------------------------------------- 0.47s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:56 Get local modifications - port ------------------------------------------ 0.47s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:51 Get local modifications - fcontext -------------------------------------- 0.44s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:61 fedora.linux_system_roles.selinux : Check if system is ostree ----------- 0.38s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:5 fedora.linux_system_roles.selinux : Ensure ansible_facts used by role --- 0.37s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/set_facts_packages.yml:2 fedora.linux_system_roles.selinux : Check if transactional-update exists in /sbin --- 0.26s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:17 Initial changes --------------------------------------------------------- 0.14s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/tests_fcontext.yml:17 fedora.linux_system_roles.selinux : Set flag if transactional-update exists --- 0.09s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Unset facts used above -------------------------------------------------- 0.06s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:66 Set is_el6 flag --------------------------------------------------------- 0.06s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:38 fedora.linux_system_roles.selinux : Set flag if transactional-update exists --- 0.05s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:22 Ensure selinux-policy-targeted ------------------------------------------ 0.05s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:22 fedora.linux_system_roles.selinux : Install SELinux python3 tools ------- 0.04s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/roles/selinux/tasks/ensure_selinux_packages.yml:35 Ensure SELinux testing packages ----------------------------------------- 0.04s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:17 Ensure findmnt ---------------------------------------------------------- 0.04s /tmp/collections-hr0/ansible_collections/fedora/linux_system_roles/tests/selinux/set_selinux_variables.yml:29