primeira versão da role
This commit is contained in:
parent
ca802e834e
commit
dd89fb3261
45
roles/utilizadores/tasks/main.yml
Normal file
45
roles/utilizadores/tasks/main.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user