From fe6e91d8e4d9bb7e04a1c7fd91cf82b75f703547 Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Tue, 12 May 2026 17:06:26 +0200 Subject: [PATCH] hostname gathering facts --- examples/004_services/playbooks/hostname.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/004_services/playbooks/hostname.yml b/examples/004_services/playbooks/hostname.yml index a1a3ad6..47b77ae 100644 --- a/examples/004_services/playbooks/hostname.yml +++ b/examples/004_services/playbooks/hostname.yml @@ -3,3 +3,9 @@ tasks: - name: get server hostname command: hostname + - name: mostrar IP del host + debug: + msg: "IP: {{ ansible_default_ipv4.address }}" + - name: mostrar hostname + debug: + msg: "Host: {{ ansible_hostname }}" \ No newline at end of file