Manage admin users, authorized keys and sudo access.
None.
Define the following variables in your inventory or playbook to create, update and remove admin users:
admin_users:
- username: joe
fullname: "Joe User"
ssh_keys:
- "ssh-rsa ..."
- "ssh-rsa ..."
- username: jim
fullname: "Jim User"
ssh_keys:
- "ssh-rsa ..."
admin_users_sudo_nopasswd: true
admin_users_to_remove:
- username: bob
- username: fred
None.
The following playbook updates admin users on dev and prod servers with different options:
- hosts: dev-servers
roles:
- role: cchurch.admin-users
admin_users: dev_admin_users
- hosts: prod-servers
roles:
- role: cchurch.admin-users
admin_users: prod_admin_users
admin_users_sudo_nopasswd: false
BSD
Chris Church chris@ninemoreminutes.com