less is more
This commit is contained in:
parent
62a4d1b470
commit
1f672dbfeb
6
roles/utilizadores/defaults/main.yml
Normal file
6
roles/utilizadores/defaults/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
utilizadores:
|
||||
- name: tc
|
||||
github: tcarrondo
|
||||
- name: hugopeixoto
|
||||
github: hugopeixoto
|
@ -12,34 +12,22 @@
|
||||
regexp: '^%ansoladm'
|
||||
line: '%ansoladm ALL=(ALL) NOPASSWD: ALL'
|
||||
|
||||
# Tiago Carrondo
|
||||
# Utilizadores e chaves
|
||||
|
||||
- name: Add user 'tc'
|
||||
- name: Add user(s)
|
||||
become: true
|
||||
user:
|
||||
name: tc
|
||||
name: '{{ item.name }}'
|
||||
shell: /bin/bash
|
||||
groups: ansoladm
|
||||
append: yes
|
||||
- name: Add 'tc' authorized keys
|
||||
with_items:
|
||||
- '{{utilizadores}}'
|
||||
- name: Add authorized key(s)
|
||||
become: true
|
||||
authorized_key:
|
||||
user: tc
|
||||
user: '{{ item.name }}'
|
||||
state: present
|
||||
key: https://github.com/tcarrondo.keys
|
||||
|
||||
# Hugo Peixoto
|
||||
|
||||
- name: Add user 'hugopeixoto'
|
||||
become: true
|
||||
user:
|
||||
name: hugopeixoto
|
||||
shell: /bin/bash
|
||||
groups: ansoladm
|
||||
append: yes
|
||||
- name: Add 'hugopeixoto' authorized keys
|
||||
become: true
|
||||
authorized_key:
|
||||
user: hugopeixoto
|
||||
state: present
|
||||
key: https://github.com/hugopeixoto.keys
|
||||
key: https://github.com/{{ item.github }}.keys
|
||||
with_items:
|
||||
- '{{utilizadores}}'
|
||||
|
Loading…
Reference in New Issue
Block a user