685 B
685 B
This role is current unusable. On RHEL7.6, the password ansible sets is different from the genenated one.
Ansible role for creating OS user
Create user and optionally put user into sudoers. By default, user is added to ssh_access group. Group will be created if not exist.
URL: https://xpk.headdesk.me/git/xpk/role.users
Required variables:
user:
name: john
group: clientadmin
sudoers: yes/no
Usage:
Create a playbook like this
---
- name: create user user1
hosts: me
become: yes
roles:
- role: users
vars:
user:
name: user1
group: staff
sudoers: yes
Tested on
- RHEL7
- CentOS7
- Ubuntu18