ansible-playbook [core 2.16.12] 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-1yn executable location = /usr/local/bin/ansible-playbook python version = 3.12.1 (main, Feb 21 2024, 14:18:26) [GCC 8.5.0 20210514 (Red Hat 8.5.0-21)] (/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-1yn/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-1yn/ansible_collections/fedora/linux_system_roles/tests/sudo/tests_default.yml:9 Wednesday 16 October 2024 15:58:25 -0400 (0:00:00.032) 0:00:00.032 ***** included: /tmp/collections-1yn/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml for managed-node1 TASK [Create temp test directory] ********************************************** task path: /tmp/collections-1yn/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:3 Wednesday 16 October 2024 15:58:25 -0400 (0:00:00.013) 0:00:00.045 ***** changed: [managed-node1] => { "ansible_facts": { "discovered_interpreter_python": "/usr/libexec/platform-python" }, "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/var/tmp/sudo_j_4damkm", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup sudoers] ********************************************************** task path: /tmp/collections-1yn/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:10 Wednesday 16 October 2024 15:58:25 -0400 (0:00:00.507) 0:00:00.553 ***** changed: [managed-node1] => { "changed": true, "checksum": "e7f68410087808d301bd81bc78423b1227123bf2", "dest": "/var/tmp/sudo_j_4damkm/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-1yn/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:19 Wednesday 16 October 2024 15:58:26 -0400 (0:00:00.451) 0:00:01.004 ***** changed: [managed-node1] => { "changed": true, "checksum": null, "dest": "/var/tmp/sudo_j_4damkm/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-1yn/ansible_collections/fedora/linux_system_roles/tests/sudo/tests_default.yml:12 Wednesday 16 October 2024 15:58:26 -0400 (0:00:00.324) 0:00:01.329 ***** TASK [fedora.linux_system_roles.sudo : Set version specific variables] ********* task path: /tmp/collections-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:2 Wednesday 16 October 2024 15:58:26 -0400 (0:00:00.031) 0:00:01.361 ***** included: /tmp/collections-1yn/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-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:2 Wednesday 16 October 2024 15:58:26 -0400 (0:00:00.033) 0:00:01.394 ***** ok: [managed-node1] TASK [fedora.linux_system_roles.sudo : Check if system is ostree] ************** task path: /tmp/collections-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:10 Wednesday 16 October 2024 15:58:27 -0400 (0:00:00.672) 0:00:02.067 ***** 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-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:15 Wednesday 16 October 2024 15:58:27 -0400 (0:00:00.413) 0:00:02.480 ***** 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-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:22 Wednesday 16 October 2024 15:58:27 -0400 (0:00:00.019) 0:00:02.500 ***** ok: [managed-node1] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.sudo : Set flag if transactional-update exists] *** task path: /tmp/collections-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:27 Wednesday 16 October 2024 15:58:28 -0400 (0:00:00.317) 0:00:02.818 ***** 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-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:31 Wednesday 16 October 2024 15:58:28 -0400 (0:00:00.019) 0:00:02.838 ***** 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_8.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS_8.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node1] => (item=CentOS_8.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS_8.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-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:5 Wednesday 16 October 2024 15:58:28 -0400 (0:00:00.027) 0:00:02.865 ***** 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-1yn/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:12 Wednesday 16 October 2024 15:58:28 -0400 (0:00:00.027) 0:00:02.892 ***** 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'. 'dict object' has no attribute 'sudoers'. {{ ansible_facts['sudoers'].sudoers_files | map('dict2items') | map('rejectattr', 'key', 'match', '^include_files$') | map('items2dict') }}: 'dict object' has no attribute 'sudoers'. 'dict object' has no attribute 'sudoers' The error appears to be in '/tmp/collections-1yn/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