first commit

This commit is contained in:
xpk
2019-01-21 18:51:25 +08:00
commit 87957c15b5
2 changed files with 63 additions and 0 deletions
+14
View File
@@ -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