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

---
 motd-complex.j2 |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/motd-complex.j2 b/motd-complex.j2
index 067253a..e12292c 100644
--- a/motd-complex.j2
+++ b/motd-complex.j2
@@ -8,8 +8,11 @@
 
 This system has the following IPv4 addresses configured:
 {% for myip in ansible_facts['all_ipv4_addresses'] %}
-- IP #{{ loop.index }}: {{ myip }}
-
-Debug: {{ loop }}
+- IP #{{ loop.index }} of {{ loop.length }}: {{ myip }}
 {% endfor %}
 
+{% for member in groups['server'] %}
+Part of the server group: {{ member }}
+{% endfor %}
+
+{{ ansible_facts['all_ipv4_addresses'] | to_nice_json }}
\ No newline at end of file

--
Gitblit v1.9.3