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'
|
regexp: '^%ansoladm'
|
||||||
line: '%ansoladm ALL=(ALL) NOPASSWD: ALL'
|
line: '%ansoladm ALL=(ALL) NOPASSWD: ALL'
|
||||||
|
|
||||||
# Tiago Carrondo
|
# Utilizadores e chaves
|
||||||
|
|
||||||
- name: Add user 'tc'
|
- name: Add user(s)
|
||||||
become: true
|
become: true
|
||||||
user:
|
user:
|
||||||
name: tc
|
name: '{{ item.name }}'
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
groups: ansoladm
|
groups: ansoladm
|
||||||
append: yes
|
append: yes
|
||||||
- name: Add 'tc' authorized keys
|
with_items:
|
||||||
|
- '{{utilizadores}}'
|
||||||
|
- name: Add authorized key(s)
|
||||||
become: true
|
become: true
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: tc
|
user: '{{ item.name }}'
|
||||||
state: present
|
state: present
|
||||||
key: https://github.com/tcarrondo.keys
|
key: https://github.com/{{ item.github }}.keys
|
||||||
|
with_items:
|
||||||
# Hugo Peixoto
|
- '{{utilizadores}}'
|
||||||
|
|
||||||
- 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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user