ansible-playbook [core 2.17.5] config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.12/site-packages/ansible ansible collection location = /tmp/collections-t3f executable location = /usr/local/bin/ansible-playbook python version = 3.12.6 (main, Sep 9 2024, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-2)] (/usr/bin/python3.12) jinja version = 3.1.4 libyaml = True No config file found; using defaults running playbook inside collection fedora.linux_system_roles redirecting (type: callback) ansible.builtin.debug to ansible.posix.debug redirecting (type: callback) ansible.builtin.debug to ansible.posix.debug redirecting (type: callback) ansible.builtin.profile_tasks to ansible.posix.profile_tasks Skipping callback 'default', as we already have a stdout callback. Skipping callback 'minimal', as we already have a stdout callback. Skipping callback 'oneline', as we already have a stdout callback. PLAYBOOK: tests_default.yml **************************************************** 1 plays in /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/tests/sudo/tests_default.yml PLAY [Ensure that the role runs with default parameters] *********************** TASK [Test setup] ************************************************************** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/tests/sudo/tests_default.yml:9 Wednesday 16 October 2024 15:58:08 -0400 (0:00:00.034) 0:00:00.034 ***** included: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml for managed-node1 TASK [Create temp test directory] ********************************************** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:3 Wednesday 16 October 2024 15:58:08 -0400 (0:00:00.015) 0:00:00.049 ***** [WARNING]: Platform linux on host managed-node1 is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible- core/2.17/reference_appendices/interpreter_discovery.html for more information. changed: [managed-node1] => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python3.9" }, "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/var/tmp/sudo_6aqaa3z1", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup sudoers] ********************************************************** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:10 Wednesday 16 October 2024 15:58:09 -0400 (0:00:00.493) 0:00:00.543 ***** changed: [managed-node1] => { "changed": true, "checksum": "e7f68410087808d301bd81bc78423b1227123bf2", "dest": "/var/tmp/sudo_6aqaa3z1/sudoers", "gid": 0, "group": "root", "md5sum": "e46a568fe9aa73104a1781f414ca6baf", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 771, "src": "/etc/sudoers", "state": "file", "uid": 0 } TASK [Backup sudoers.d] ******************************************************** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:19 Wednesday 16 October 2024 15:58:09 -0400 (0:00:00.453) 0:00:00.997 ***** changed: [managed-node1] => { "changed": true, "checksum": null, "dest": "/var/tmp/sudo_6aqaa3z1/sudoers.d", "gid": 0, "group": "root", "md5sum": null, "mode": "0644", "owner": "root", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 23, "src": "/etc/sudoers.d", "state": "directory", "uid": 0 } TASK [Run the role] ************************************************************ task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/tests/sudo/tests_default.yml:12 Wednesday 16 October 2024 15:58:09 -0400 (0:00:00.322) 0:00:01.319 ***** included: fedora.linux_system_roles.sudo for managed-node1 TASK [fedora.linux_system_roles.sudo : Set version specific variables] ********* task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:2 Wednesday 16 October 2024 15:58:09 -0400 (0:00:00.032) 0:00:01.352 ***** included: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml for managed-node1 TASK [fedora.linux_system_roles.sudo : Ensure ansible_facts used by role] ****** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:2 Wednesday 16 October 2024 15:58:10 -0400 (0:00:00.035) 0:00:01.387 ***** ok: [managed-node1] TASK [fedora.linux_system_roles.sudo : Check if system is ostree] ************** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:10 Wednesday 16 October 2024 15:58:10 -0400 (0:00:00.645) 0:00:02.032 ***** ok: [managed-node1] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.sudo : Set flag to indicate system is ostree] *** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:15 Wednesday 16 October 2024 15:58:11 -0400 (0:00:00.405) 0:00:02.437 ***** ok: [managed-node1] => { "ansible_facts": { "__sudo_is_ostree": false }, "changed": false } TASK [fedora.linux_system_roles.sudo : Check if transactional-update exists in /sbin] *** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:22 Wednesday 16 October 2024 15:58:11 -0400 (0:00:00.020) 0:00:02.458 ***** ok: [managed-node1] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.sudo : Set flag if transactional-update exists] *** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:27 Wednesday 16 October 2024 15:58:11 -0400 (0:00:00.314) 0:00:02.772 ***** ok: [managed-node1] => { "ansible_facts": { "__sudo_is_transactional": false }, "changed": false } TASK [fedora.linux_system_roles.sudo : Set platform/version specific variables] *** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:31 Wednesday 16 October 2024 15:58:11 -0400 (0:00:00.021) 0:00:02.794 ***** skipping: [managed-node1] => (item=RedHat.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "RedHat.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS_9.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS_9.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => { "changed": false } MSG: All items skipped TASK [fedora.linux_system_roles.sudo : Scan sudoers] *************************** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:5 Wednesday 16 October 2024 15:58:11 -0400 (0:00:00.030) 0:00:02.824 ***** skipping: [managed-node1] => { "changed": false, "false_condition": "sudo_check_if_configured | bool", "skip_reason": "Conditional result was False" } TASK [fedora.linux_system_roles.sudo : Sudo is already configured - skip rest of role] *** task path: /tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:12 Wednesday 16 October 2024 15:58:11 -0400 (0:00:00.030) 0:00:02.855 ***** ERROR! The conditional check '__actual == sudo_sudoers_files' failed. The error was: error while evaluating conditional (__actual == sudo_sudoers_files): {{ ansible_facts['sudoers'].sudoers_files | map('dict2items') | map('rejectattr', 'key', 'match', '^include_files$') | map('items2dict') }}: 'dict object' has no attribute 'sudoers' The error appears to be in '/tmp/collections-t3f/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml': line 12, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Sudo is already configured - skip rest of role ^ here