Create on each server (file hosts) users from the list (file users.yml).
- Shell = /bin/bash
- Add the public key in pub_keys dir (username.pub)
- In users.yml specify that user should have the right to sudo or not
Works on every machine were Ansible works.
- Install Ansible
- Create keys
- Configure users and provide authorized_keys
- Run
ansible-playbook -i ,hosts create_users.yml