Don't create user when updating passwords

16 views
Skip to first unread message

Martyn Kempster

unread,
Mar 22, 2018, 8:10:42 AM3/22/18
to Ansible Project
Is there a way in the user module to not create a user if it doesn't find it. This is so we can update the password for that user on a list of servers, but if the server doesn't have the user it will just skip it rather than create a new user

Brian Coca

unread,
Mar 22, 2018, 9:26:23 AM3/22/18
to Ansible Project
Use the getent module to get user list, make the user task conditional on that.

----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages