forked from LibreSchool/server-config
22 lines
603 B
YAML
22 lines
603 B
YAML
---
|
|
- name: Creazione account di gestione Ansible
|
|
user:
|
|
name: amgmt
|
|
comment: "Ansible Management User"
|
|
group: wheel
|
|
state: present
|
|
password: $6$rounds=100000$XvHuMoXtpCksx379$nhlfUn38.oBB7JrDrtwfUisw8T0Bg5InzFq1fw31mcEmGZ2AYFkFK2zC2g04lSfw.kpdSgqH3Dl5q9r1fY6.k.
|
|
|
|
- name: Concessione diritti all'utente di gestione Ansible
|
|
template:
|
|
src: sudoers.d
|
|
dest: /etc/sudoers.d/amgmt
|
|
mode: "u=r,g=r"
|
|
validate: "visudo -cf %s"
|
|
|
|
- name: Installazione chiave privata PC locale
|
|
authorized_key:
|
|
user: amgmt
|
|
key: "{{ lookup('file', admin_sshkey) }}"
|
|
state: present
|