Managing users in Ansible
Now, we will discuss how to manage users in different systems.
Linux systems
Ansible provides powerful user management modules to manage different tasks on a system. We have a chapter dedicated to discussing Ansible (Chapter 13, Ansible for System Administration), but in this chapter, we will explore its power for managing user accounts across a company's infrastructure.
Sometimes, companies allow root access to all users, to get rid of the headache of user management; this is not a good solution in terms of security and auditing. It's the best practice to give the right permissions to the right users, and to revoke them once users leave the company.
Ansible provides an unmatched way to manage users across multiple servers, through either password or password-less (SSH key) access.
There are a few other things that need to be taken into consideration when creating users in a Linux system. The user must have a shell (such as Bash, CSH, ZSH, and so on) in order to log...