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-OUd executable location = /usr/local/bin/ansible-playbook python version = 3.12.6 (main, Sep 9 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)] (/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-OUd/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-OUd/ansible_collections/fedora/linux_system_roles/tests/sudo/tests_default.yml:9 Wednesday 16 October 2024 15:57:38 -0400 (0:00:00.051) 0:00:00.051 ***** included: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml for managed-node2 TASK [Create temp test directory] ********************************************** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:3 Wednesday 16 October 2024 15:57:38 -0400 (0:00:00.028) 0:00:00.079 ***** [WARNING]: Platform linux on host managed-node2 is using the discovered Python interpreter at /usr/bin/python3.12, 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-node2] => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python3.12" }, "changed": true, "gid": 0, "group": "root", "mode": "0700", "owner": "root", "path": "/var/tmp/sudo_wkxxpdgy", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [Backup sudoers] ********************************************************** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:10 Wednesday 16 October 2024 15:57:39 -0400 (0:00:00.505) 0:00:00.585 ***** changed: [managed-node2] => { "changed": true, "checksum": "e683ad5e5d8d7112d14924c11c98be7bf2ef4918", "dest": "/var/tmp/sudo_wkxxpdgy/sudoers", "gid": 0, "group": "root", "md5sum": "1b134d95a4618029ff962a63b021e1ca", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 4328, "src": "/etc/sudoers", "state": "file", "uid": 0 } TASK [Backup sudoers.d] ******************************************************** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/tests/sudo/tasks/setup.yml:19 Wednesday 16 October 2024 15:57:39 -0400 (0:00:00.443) 0:00:01.029 ***** changed: [managed-node2] => { "changed": true, "checksum": null, "dest": "/var/tmp/sudo_wkxxpdgy/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-OUd/ansible_collections/fedora/linux_system_roles/tests/sudo/tests_default.yml:12 Wednesday 16 October 2024 15:57:39 -0400 (0:00:00.337) 0:00:01.367 ***** included: fedora.linux_system_roles.sudo for managed-node2 TASK [fedora.linux_system_roles.sudo : Set version specific variables] ********* task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:2 Wednesday 16 October 2024 15:57:39 -0400 (0:00:00.048) 0:00:01.415 ***** included: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml for managed-node2 TASK [fedora.linux_system_roles.sudo : Ensure ansible_facts used by role] ****** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:2 Wednesday 16 October 2024 15:57:39 -0400 (0:00:00.016) 0:00:01.432 ***** ok: [managed-node2] TASK [fedora.linux_system_roles.sudo : Check if system is ostree] ************** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:10 Wednesday 16 October 2024 15:57:40 -0400 (0:00:00.670) 0:00:02.102 ***** ok: [managed-node2] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.sudo : Set flag to indicate system is ostree] *** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:15 Wednesday 16 October 2024 15:57:40 -0400 (0:00:00.399) 0:00:02.501 ***** ok: [managed-node2] => { "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-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:22 Wednesday 16 October 2024 15:57:40 -0400 (0:00:00.019) 0:00:02.521 ***** ok: [managed-node2] => { "changed": false, "stat": { "exists": false } } TASK [fedora.linux_system_roles.sudo : Set flag if transactional-update exists] *** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:27 Wednesday 16 October 2024 15:57:41 -0400 (0:00:00.318) 0:00:02.839 ***** ok: [managed-node2] => { "ansible_facts": { "__sudo_is_transactional": false }, "changed": false } TASK [fedora.linux_system_roles.sudo : Set platform/version specific variables] *** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/set_vars.yml:31 Wednesday 16 October 2024 15:57:41 -0400 (0:00:00.018) 0:00:02.858 ***** skipping: [managed-node2] => (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-node2] => (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-node2] => (item=CentOS_10.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS_10.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node2] => (item=CentOS_10.yml) => { "ansible_loop_var": "item", "changed": false, "false_condition": "__vars_file is file", "item": "CentOS_10.yml", "skip_reason": "Conditional result was False" } skipping: [managed-node2] => { "changed": false } MSG: All items skipped TASK [fedora.linux_system_roles.sudo : Scan sudoers] *************************** task path: /tmp/collections-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:5 Wednesday 16 October 2024 15:57:41 -0400 (0:00:00.025) 0:00:02.884 ***** skipping: [managed-node2] => { "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-OUd/ansible_collections/fedora/linux_system_roles/roles/sudo/tasks/main.yml:12 Wednesday 16 October 2024 15:57:41 -0400 (0:00:00.025) 0:00:02.909 ***** 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-OUd/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