fixes #646 - add another condition to getent task (#647)

Signed-off-by: gbolo <george.bolo@gmail.com>
This commit is contained in:
George Bolo 2023-03-06 06:07:40 -05:00 committed by GitHub
parent 879ecefd8c
commit 3d0b6670d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,9 @@
ansible.builtin.getent:
database: passwd
# creates a dict for each user containing UID/HOMEDIR etc...
when: getent_passwd is undefined # skip this task if "getent" has run before
# skip this task if getent was run before without specifying a key (single entry)
when: getent_passwd is undefined or
getent_passwd | length <= 1
- name: Read local linux shadow database
ansible.builtin.getent: