Ansible role to provision users and add ssh keys.
Create a list of users following this format:
host_local_users:
- name: engonzal
createhome: yes
shell: "/bin/bash"
groups: wheel
pubkeys:
- 'ssh-rsa myr4nd0mk3y engonzal@home'
- name: engontowel
- hosts: servers
vars:
host_local_users:
- name: engonshowel
- name: engonzal
createhome: yes
shell: "/bin/bash"
groups: wheel
pubkeys:
- 'ssh-rsa myr4nd0mk3y engonzal@home'
roles:
- { role: engonzal.users, tags: [ 'users'] }
BSD
Noe Gonzalez - http://engonzal.com