Answer the question
In order to leave comments, you need to log in
How to properly create system users in Ansible via whitelist?
Task:
To achieve a state when only certain users exist on the hosts.
That is a kind of "white list". You need to do it through Ansible.
Requests:
1. Do not advise LDAP and so on, you need to do it through Ansible.
2. Do not say that this is all the wrong approach.
Answer the question
In order to leave comments, you need to log in
Well, you can just take the reference passvd file and compare it with what is on the server, if someone added it will pop up immediately
Add via user_module ansible.
It will not work to delete in batches, only with finding out the users and writing the role to delete them. In the same link, there are examples for both adding and deleting.
Well, this list will be permanent if you don’t let people create new users and don’t install new software. As a last resort, find out and beat hands very hard.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question