From 8ae6813615f61cca3080eb0529c6c06baf406f20 Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Tue, 12 May 2026 17:11:22 +0200 Subject: [PATCH] gather facts --- examples/004_services/playbooks/hostname.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/004_services/playbooks/hostname.yml b/examples/004_services/playbooks/hostname.yml index 47b77ae..a07dc21 100644 --- a/examples/004_services/playbooks/hostname.yml +++ b/examples/004_services/playbooks/hostname.yml @@ -1,6 +1,10 @@ --- - hosts: all + gather_facts: true tasks: + - name: mostrar tots el gather facts + debug: + var: ansible_facts - name: get server hostname command: hostname - name: mostrar IP del host