role-utilizadores-ansol #7

Merged
hugopeixoto merged 4 commits from role-utilizadores-ansol into master 2022-03-06 15:06:12 +00:00
Showing only changes of commit dd89fb3261 - Show all commits

View File

@ -0,0 +1,45 @@
---
# Grupo ansoladm
- name: Create group 'ansoladm'
group:
name: ansoladm
state: present
- name: 'Allow ansoladm users to sudo without a password'
lineinfile:
dest: '/etc/sudoers'
state: 'present'
regexp: '^%ansoladm'
line: '%ansoladm ALL=(ALL) NOPASSWD: ALL'
# Tiago Carrondo
- name: Add user 'tc'
become: true
user:
name: tc
shell: /bin/bash
groups: ansoladm
append: yes
- name: Add 'tc' authorized keys
become: true
authorized_key:
user: tc
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