first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
- name: Create user {{ user.name }}
|
||||
user:
|
||||
name: "{{ user.name }}"
|
||||
shell: /bin/bash
|
||||
groups: "{{ user.group }},ssh_access"
|
||||
password: "{{ user.pwhash }}"
|
||||
|
||||
- name: Add user to sudoers
|
||||
lineinfile:
|
||||
path: "/etc/sudoers.d/{{ user.name }}"
|
||||
create: yes
|
||||
line: "{{ user.name }} ALL=(ALL) NOPASSWD: ALL"
|
||||
when: user.sudoers
|
||||
|
||||
Reference in New Issue
Block a user