Initial commit
This commit is contained in:
commit
d6bd3862eb
19 changed files with 357 additions and 0 deletions
1
roles/administrators/files/atomaka.pub
Normal file
1
roles/administrators/files/atomaka.pub
Normal file
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETR1+I4hzK79yoQUvSbBZ3scdXaZvB/9ZOHtJ/rMqig me@atomaka.com
|
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 }}"
|
3
roles/administrators/vars/main.yml
Normal file
3
roles/administrators/vars/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
users:
|
||||
- atomaka
|
Loading…
Add table
Add a link
Reference in a new issue