Closed rvodden closed 3 weeks ago
If i run ansible knuth -m ansible.builtin.getent -i ansible/inventory/ -a "database=shadow"
then I get an empty response as we're seeing here:
knuth | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3",
"getent_shadow": {}
},
"changed": false
}
However if I run ansible knuth -m ansible.builtin.getent -i ansible/inventory/ -a "database=shadow" -b
(note the -b
) then I get a populated output:
ok as none of the tasks in os_hardening
are marked as become: true
I guess the design intent is that it is run with become: true
Woudl you welcome a PR to update the example playbook?
- hosts: all
roles:
- name: devsec.hardening.os_hardening
Sure thing! You need to update it here, though: https://github.com/dev-sec/ansible-collection-hardening/blob/683706a024bea18a304a81186f26132eab20ef9a/.aar_doc.yml#L45, as we automatically generate the Readme.
I hit this issue as well while testing this role in --check mode.
Description
Running os_hardening again Ubuntu 24.04 (on Pi5).
Reproduction steps
with a requirements.yml like this:
Current Behavior
Expected Behavior
The task to succeed
OS / Environment
Ubuntu 24.04 arm64
Ansible Version
Collection Version
Additional information
I can't find anywhere in the role that
getent_shadow
is populated, and its showing up in-vvv
as blank: