role-utilizadores-ansol #7

Merged
hugopeixoto merged 4 commits from role-utilizadores-ansol into master 2022-03-06 15:06:12 +00:00
2 changed files with 16 additions and 22 deletions
Showing only changes of commit 1f672dbfeb - Show all commits

View File

@ -0,0 +1,6 @@
---
utilizadores:
- name: tc
github: tcarrondo
- name: hugopeixoto
github: hugopeixoto

View File

@ -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}}'