D
D
danis9yearsago2017-08-31 11:05:00
Ansible
danis9yearsago, 2017-08-31 11:05:00

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

2 answer(s)
P
Puma Thailand, 2017-08-31
@opium

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

M
mureevms, 2017-08-31
@mureevms

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 question

Ask a Question

731 491 924 answers to any question