Initial commit
This commit is contained in:
commit
d6bd3862eb
19 changed files with 357 additions and 0 deletions
23
roles/administrators/tasks/main.yml
Normal file
23
roles/administrators/tasks/main.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
- name: Allow passwordless sudo
|
||||
lineinfile:
|
||||
path: /etc/sudoers
|
||||
regexp: '^%sudo'
|
||||
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
|
||||
validate: 'visudo -cf %s'
|
||||
state: present
|
||||
|
||||
- name: Add administrators
|
||||
user:
|
||||
name: "{{ item }}"
|
||||
groups: sudo
|
||||
shell: /bin/bash
|
||||
state: present
|
||||
with_items: "{{ users }}"
|
||||
|
||||
- name: Add SSH keys
|
||||
authorized_key:
|
||||
user: "{{ item }}"
|
||||
key: "{{ lookup('file', 'files/{{ item }}.pub') }}"
|
||||
state: present
|
||||
with_items: "{{ users }}"
|
Loading…
Add table
Add a link
Reference in a new issue