Hi all,
I'm migrating form puppet. The last playbook/manifest which is missing is
the user management.
On the puppet I wroute module and some libs an it worked like this
I habe list of pavl users in some array
users_available: user01, user02, user03, user04
For each server I have list of enabled users, this could be done by
host_vars in ansible
users_enabled: user01, user03
If you add the user to the "users_enabled", the user is created. So far so
good.
And now the tricky part. If you remove the user from the user_enabled, the
user is removed, so the ansible script should be able to check
- If the user in "users_enabled" and do not exists, create it
- if the user in "users_avaiable" - "users_enabled" and exists, remote it
Please could anybody help me to solve this tricky problem? I' managing
couple of server, where no all users have access to all servers.
So I need to do the list difference.
best regards
Peter Hudec