Creating and managing users and authentication options
You just executed a playbook that validated reachability to the devices. In this recipe, you will create the same two users we’ve been using throughout this part of the book. The ansible-ro user will be configured as a read-only user, and the read/write user will be named ansible-rw:
- Edit the encrypted
varsfile (srl_secrets.yml) that was created in the last section:root@cookbook-lab:~/cookbook-lab/chapters/ch06# ansible-vault edit srl_secret.yml ... an editor is opened ... --- ... omitted output ... ansible_rw_password: “ansible123” ansible_ro_password: “ansiblero123” - Create a new playbook called
pb_users.ymlthat will take care of provisioning the users:root@cookbook-lab:~/cookbook-lab/chapters/ch06# vi pb_users.yml --- - name: “Create New User with Ansible” hosts: “nokia_srlinux...