Implementazione prima bozza di task remoti.
This commit is contained in:
parent
8f45395ff0
commit
1de3032c30
@ -2,6 +2,5 @@
|
||||
|
||||
- hosts: localhost
|
||||
user: root
|
||||
tasks:
|
||||
- name: Test task
|
||||
lineinfile: dest=/tmp/ansible-pull-test.log line=FUNZIONA state=present create=yes
|
||||
roles:
|
||||
- init
|
||||
|
25
roles/init/tasks/init.yml
Normal file
25
roles/init/tasks/init.yml
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
# Task di configurazione iniziali
|
||||
|
||||
- name: Creazione utente di gestione
|
||||
user:
|
||||
name: amgmt
|
||||
comment: "Ansible Management User"
|
||||
group: users
|
||||
password: $6$rounds=100000$XvHuMoXtpCksx379$nhlfUn38.oBB7JrDrtwfUisw8T0Bg5InzFq1fw31mcEmGZ2AYFkFK2zC2g04lSfw.kpdSgqH3Dl5q9r1fY6.k.
|
||||
shell: /bin/bash
|
||||
state: present
|
||||
generate_ssh_key: yes
|
||||
|
||||
- name: Concessione diritti sudo all'utente ansible
|
||||
lineinfile:
|
||||
dest: /etc/sudoers.d/amgmt
|
||||
regexp: "^amgmt.*NOPASSWD"
|
||||
line: "amgmt ALL=(ALL:ALL) NOPASSWD:ALL"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0440
|
||||
create: yes
|
||||
state: present
|
||||
|
||||
# TODO: implementare download e installazione della chiave pubblica
|
5
roles/init/tasks/main.yml
Normal file
5
roles/init/tasks/main.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
- include: init.yml
|
||||
tags:
|
||||
- init
|
Loading…
x
Reference in New Issue
Block a user