additional course material RH294
Olaf Bohlen
2020-02-19 08669995dd66a7051d2fc222fec02a0bc71c1dff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Welcome to the server {{ ansible_facts['hostname'] }}.
This system proudly runs {{ ansible_facts['distribution'] }} {{ ansible_facts['distribution_version'] }}.
 
{# this is a comment #}
{% if ansible_machine == 'x86_64' %}
We are running 64bit mode.
{% endif %}
 
This system has the following IPv4 addresses configured:
{% for myip in ansible_facts['all_ipv4_addresses'] %}
- 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 }}