# STDOUT: ---v---v---v---v---v--- ansible-playbook 2.9.27 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/jenkins/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /opt/ansible-2.9/lib/python3.9/site-packages/ansible executable location = /opt/ansible-2.9/bin/ansible-playbook python version = 3.9.18 (main, Sep 7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] Using /etc/ansible/ansible.cfg as config file 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 '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_multiple_sudoers.yml ******************************************* 1 plays in /WORKDIR/git-code_v2l7qqy/tests/tests_multiple_sudoers.yml PLAY [Basic test for Sudo] ***************************************************** TASK [Gathering Facts] ********************************************************* task path: /WORKDIR/git-code_v2l7qqy/tests/tests_multiple_sudoers.yml:2 Friday 17 May 2024 14:13:56 +0000 (0:00:00.012) 0:00:00.012 ************ ok: [sut] META: ran handlers TASK [Run the role] ************************************************************ task path: /WORKDIR/git-code_v2l7qqy/tests/tests_multiple_sudoers.yml:7 Friday 17 May 2024 14:13:56 +0000 (0:00:00.700) 0:00:00.713 ************ TASK [linux-system-roles.sudo : Ensure sudo is installed] ********************** task path: /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:2 Friday 17 May 2024 14:13:56 +0000 (0:00:00.017) 0:00:00.730 ************ ok: [sut] => { "changed": false, "rc": 0, "results": [] } MSG: Nothing to do TASK [linux-system-roles.sudo : Set include directories variable] ************** task path: /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:8 Friday 17 May 2024 14:13:59 +0000 (0:00:02.548) 0:00:03.279 ************ ok: [sut] => { "ansible_facts": { "sudo_include_dirs": [ "/etc/sudoers.d" ] }, "changed": false } TASK [linux-system-roles.sudo : Set sudoer file paths variable] **************** task path: /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:14 Friday 17 May 2024 14:13:59 +0000 (0:00:00.019) 0:00:03.299 ************ ok: [sut] => { "ansible_facts": { "sudo_file_paths": [ "/etc/sudoers", "/etc/sudoers.d/pingers", "/etc/sudoers.d/root" ] }, "changed": false } TASK [linux-system-roles.sudo : Ensure include directories are created] ******** task path: /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:20 Friday 17 May 2024 14:13:59 +0000 (0:00:00.018) 0:00:03.317 ************ ok: [sut] => (item=/etc/sudoers.d) => { "ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": "/etc/sudoers.d", "mode": "0750", "owner": "root", "path": "/etc/sudoers.d", "secontext": "system_u:object_r:etc_t:s0", "size": 6, "state": "directory", "uid": 0 } TASK [linux-system-roles.sudo : Ensure sudoers include files are configured] *** task path: /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:30 Friday 17 May 2024 14:13:59 +0000 (0:00:00.278) 0:00:03.595 ************ skipping: [sut] => (item=/etc/sudoers) => { "ansible_loop_var": "item", "changed": false, "item": { "aliases": { "cmnd_alias": [ { "commands": [ "/bin/ping" ], "name": "PING" } ], "user_alias": [ { "name": "PINGERS" } ], "users": [ "username" ] }, "defaults": [ "!visiblepw", "always_set_home", "match_group_by_gid", "always_query_group_plugin", "env_reset", { "secure_path": [ "/sbin", "/bin", "/usr/sbin", "/usr/bin" ] }, { "env_keep": [ "COLORS", "DISPLAY", "HOSTNAME", "HISTSIZE", "KDEDIR", "LS_COLORS", "MAIL", "PS1", "PS2", "QTDIR", "USERNAME", "LANG", "LC_ADDRESS", "LC_CTYPE", "LC_COLLATE", "LC_IDENTIFICATION", "LC_MEASUREMENT", "LC_MESSAGES", "LC_MONETARY", "LC_NAME", "LC_NUMERIC", "LC_PAPER", "LC_TELEPHONE", "LC_TIME", "LC_ALL", "LANGUAGE", "LINGUAS", "_XKB_CHARSET", "XAUTHORITY" ] } ], "include_directories": [ "/etc/sudoers.d" ], "path": "/etc/sudoers", "user_specifications": [ { "commands": [ "ALL" ], "hosts": [ "ALL" ], "operators": [ "ALL" ], "users": [ "root" ] }, { "commands": [ "ALL" ], "hosts": [ "ALL" ], "operators": [ "ALL" ], "users": [ "%wheel" ] } ] }, "skip_reason": "Conditional result was False" } changed: [sut] => (item=/etc/sudoers.d/pingers) => { "ansible_loop_var": "item", "changed": true, "checksum": "3ffa0e8be1b62eb452314eb2c459f505e265089a", "dest": "/etc/sudoers.d/pingers", "gid": 0, "group": "root", "item": { "path": "/etc/sudoers.d/pingers", "user_specifications": [ { "defaults": [ "!requiretty" ], "type": "user", "users": [ "PINGERS" ] } ] }, "md5sum": "aa8c59060deff3caca368ae080261e25", "mode": "0440", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 111, "src": "/root/.ansible/tmp/ansible-tmp-1715955239.8808584-2353-156803611593349/source", "state": "file", "uid": 0 } changed: [sut] => (item=/etc/sudoers.d/root) => { "ansible_loop_var": "item", "changed": true, "checksum": "9b1906ff4600437b0a98e620db9bd2f3f4fcb3aa", "dest": "/etc/sudoers.d/root", "gid": 0, "group": "root", "item": { "defaults": [ "syslog=auth" ], "path": "/etc/sudoers.d/root", "user_specifications": [ { "defaults": [ "!set_logname" ], "operators": [ "root" ], "type": "runas" } ] }, "md5sum": "3e2be895126e56d1385116fa7caf03e5", "mode": "0440", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 158, "src": "/root/.ansible/tmp/ansible-tmp-1715955240.5566359-2353-88830048729956/source", "state": "file", "uid": 0 } TASK [linux-system-roles.sudo : Ensure /etc/sudoers is configured] ************* task path: /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:43 Friday 17 May 2024 14:14:01 +0000 (0:00:01.220) 0:00:04.816 ************ failed: [sut] (item=/etc/sudoers) => { "ansible_loop_var": "item", "changed": false, "item": { "aliases": { "cmnd_alias": [ { "commands": [ "/bin/ping" ], "name": "PING" } ], "user_alias": [ { "name": "PINGERS" } ], "users": [ "username" ] }, "defaults": [ "!visiblepw", "always_set_home", "match_group_by_gid", "always_query_group_plugin", "env_reset", { "secure_path": [ "/sbin", "/bin", "/usr/sbin", "/usr/bin" ] }, { "env_keep": [ "COLORS", "DISPLAY", "HOSTNAME", "HISTSIZE", "KDEDIR", "LS_COLORS", "MAIL", "PS1", "PS2", "QTDIR", "USERNAME", "LANG", "LC_ADDRESS", "LC_CTYPE", "LC_COLLATE", "LC_IDENTIFICATION", "LC_MEASUREMENT", "LC_MESSAGES", "LC_MONETARY", "LC_NAME", "LC_NUMERIC", "LC_PAPER", "LC_TELEPHONE", "LC_TIME", "LC_ALL", "LANGUAGE", "LINGUAS", "_XKB_CHARSET", "XAUTHORITY" ] } ], "include_directories": [ "/etc/sudoers.d" ], "path": "/etc/sudoers", "user_specifications": [ { "commands": [ "ALL" ], "hosts": [ "ALL" ], "operators": [ "ALL" ], "users": [ "root" ] }, { "commands": [ "ALL" ], "hosts": [ "ALL" ], "operators": [ "ALL" ], "users": [ "%wheel" ] } ] } } MSG: AnsibleUndefinedVariable: 'dict object' has no attribute 'users' skipping: [sut] => (item=/etc/sudoers.d/pingers) => { "ansible_loop_var": "item", "changed": false, "item": { "path": "/etc/sudoers.d/pingers", "user_specifications": [ { "defaults": [ "!requiretty" ], "type": "user", "users": [ "PINGERS" ] } ] }, "skip_reason": "Conditional result was False" } skipping: [sut] => (item=/etc/sudoers.d/root) => { "ansible_loop_var": "item", "changed": false, "item": { "defaults": [ "syslog=auth" ], "path": "/etc/sudoers.d/root", "user_specifications": [ { "defaults": [ "!set_logname" ], "operators": [ "root" ], "type": "runas" } ] }, "skip_reason": "Conditional result was False" } to retry, use: --limit @/tmp/tests_multiple_sudoers.retry PLAY RECAP ********************************************************************* sut : ok=6 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 Friday 17 May 2024 14:14:01 +0000 (0:00:00.142) 0:00:04.958 ************ =============================================================================== linux-system-roles.sudo : Ensure sudo is installed ---------------------- 2.55s /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:2 linux-system-roles.sudo : Ensure sudoers include files are configured --- 1.22s /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:30 Gathering Facts --------------------------------------------------------- 0.70s /WORKDIR/git-code_v2l7qqy/tests/tests_multiple_sudoers.yml:2 ------------------ linux-system-roles.sudo : Ensure include directories are created -------- 0.28s /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:20 linux-system-roles.sudo : Ensure /etc/sudoers is configured ------------- 0.14s /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:43 linux-system-roles.sudo : Set include directories variable -------------- 0.02s /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:8 linux-system-roles.sudo : Set sudoer file paths variable ---------------- 0.02s /WORKDIR/git-code_v2l7qqy/tests/roles/linux-system-roles.sudo/tasks/main.yml:14 Run the role ------------------------------------------------------------ 0.02s /WORKDIR/git-code_v2l7qqy/tests/tests_multiple_sudoers.yml:7 ------------------ ---^---^---^---^---^--- # STDERR: ---v---v---v---v---v--- ---^---^---^---^---^---