Go to file
xpk 6fdb370298
ENH: added sudoers validation
2020-02-21 14:14:09 +08:00
tasks ENH: added sudoers validation 2020-02-21 14:14:09 +08:00
README.md DOC: updated readme 2020-02-17 15:14:33 +08:00

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