How to efficiently manage user accounts in Ansible? I want to keep user accounts and certificates in list.
When running playbook I would like to create every account from list (thats easy). I also want to remove accounts existing on host, but not present in list.
For now, I figured out list existing accounts
awk -F: '($3 >= 1000) {printf "%s\n",$1}' /etc/passwd
and compare it with my list- removing unwanted accounts.
Is there easier way- module that does that out-of-the-box?