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 --- hosts.j2 | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hosts.j2 b/hosts.j2 index 377897d..7da9acf 100644 --- a/hosts.j2 +++ b/hosts.j2 @@ -1,5 +1,4 @@ # template for /etc/hosts {% for host in groups['all'] %} -{{ hostvars['host']['ansible_facts'] }} -{# {{ hostvars['host']['ansible_facts']['default_ipv4']['address'] }} {{ hostvars['host']['ansible_facts']['fqdn'] }} {{ hostvars['host']['ansible_facts']['hostname'] }} #} -{% endfor %} \ No newline at end of file +{{ hostvars[host]['ansible_facts']['default_ipv4']['address'] }} {{ hostvars[host]['ansible_facts']['fqdn'] }} {{ hostvars[host]['ansible_facts']['hostname'] }} +{% endfor %} -- Gitblit v1.9.3