Creating and managing users and authentication options
Managing users and authentication options is a common audit requirement. Tracking the local users and how they can authenticate is a great task that Ansible can manage. In this section, you will learn how to use the eos_user module in order to manage users and their authentication methods. Both password and SSH key authentication will be demonstrated.
In this recipe, you will create a new read-only user named ansible-ro. This user will use a standard password for authentication, and you will add public key authentication to that user using the following steps:
- Create a new playbook called
pb_users.yml:root@cookbook-lab:~/cookbook-lab/chapters/ch04# vi pb_users.yml --- - name: “Create New User with Ansible” hosts: “arista_ceos” tasks: - name: “Create the ansible-ro user with password...