fix: testati i playbook in 5_primi_playbooks con ansible-lint
This commit is contained in:
parent
070819687e
commit
5c84fbd77e
7 changed files with 33 additions and 36 deletions
|
|
@ -8,4 +8,3 @@
|
|||
- name: Stampo a video tutte le facts degli hosts
|
||||
ansible.builtin.debug:
|
||||
var: ansible_facts
|
||||
|
||||
|
|
|
|||
|
|
@ -30,5 +30,3 @@
|
|||
ansible.builtin.debug:
|
||||
msg: "Il file è stato copiato con successo!"
|
||||
when: file_status.stat.exists
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
group: root # gruppo
|
||||
mode: '0644' # acl del file
|
||||
|
||||
|
||||
- name: Installazione apache2, creazione directory e copia files # nome di questo play
|
||||
hosts: debian_hosts # specifica su quali hosts o gruppi di hosts deve essere eseguito questo play
|
||||
become: true # utilizza i privilegi di root (default false)
|
||||
|
|
@ -37,7 +36,7 @@
|
|||
ansible.builtin.apt:
|
||||
name: apache2 # nome del pachetto da installare
|
||||
state: latest # desiderata (latest per ultima versione aggiornata, present se è sufficiente che sia presente)
|
||||
update_cache: yes # equivalente di apt-get update
|
||||
update_cache: true # equivalente di apt-get update
|
||||
|
||||
- name: Creo la directory
|
||||
ansible.builtin.file:
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@
|
|||
- name: Aggiorno tutti i pacchetti degli hosts debian
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
when: ansible_os_family == "Debian"
|
||||
|
|
|
|||
|
|
@ -22,5 +22,3 @@
|
|||
ansible.builtin.debug:
|
||||
msg: "Il file è stato copiato con successo!"
|
||||
when: file_status.stat.exists
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
ansible.builtin.file:
|
||||
path: files/example.txt # percorso del file in locale
|
||||
state: touch # desiderata
|
||||
owner: root # owner
|
||||
group: root # gruppo
|
||||
mode: '0755' # acl del file
|
||||
delegate_to: localhost # non esegue questo task sull'host target, ma esegue in locale
|
||||
|
||||
- name: Copio il file di testo
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue