From 26d781da63ad0368921d6a0eb1f5efcb9bc479d1 Mon Sep 17 00:00:00 2001 From: Student User <student@workstation.lab.example.com> Date: Wed, 19 Feb 2020 13:08:19 +0100 Subject: [PATCH] fix hosts template --- play-with-hosts-template.yaml | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/play-with-hosts-template.yaml b/play-with-hosts-template.yaml index de8d2f4..7c77300 100644 --- a/play-with-hosts-template.yaml +++ b/play-with-hosts-template.yaml @@ -3,6 +3,8 @@ hosts: server, desktop, demoext become: true tasks: + - debug: + msg: '{{ hostvars["servera"]["ansible_facts"]["default_ipv4"]["address"] }}' - name: use template to create /etc/hosts-new template: src: hosts.j2 -- Gitblit v1.9.3