additional course material RH294
Olaf Bohlen
2020-08-20 1de6236f80a879ca110981fe0e5c0c05c521225b
motd-complex.j2
@@ -8,8 +8,12 @@
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 }}
{{ ansible_facts['all_ipv4_addresses'] | to_nice_yaml }}