xpk 6fdb370298 | ||
---|---|---|
tasks | ||
README.md |
README.md
Ansible role for creating OS users
Create users and optionally put them into sudoers. By default, users are added to ssh_access group. Group will be created if not exist. Password will be generated and displayed in ansible's output.
URL: https://xpk.headdesk.me/git/xpk/role.users
Usage:
Provide the userlist, group, and sudoers variables in a playbook, e.g:
---
- name: create user user1
hosts: me
become: yes
roles:
- role: users
vars:
userlist:
- foo1
- foo2
group: staff
sudoers: yes
Tested on
- RHEL7
- CentOS7
- Ubuntu18
Add this as a submodule to your ansible home
git submodule add https://xpk.headdesk.me/git/xpk/role.users.git roles/users
git commit -S -m 'SUB: users submodule'
git push