Compare commits
2 commits
2ed912de44
...
bb71e83d23
Author | SHA1 | Date | |
---|---|---|---|
Sam A. | bb71e83d23 | ||
Sam A. | a15eb67a0f |
|
@ -1,6 +1,6 @@
|
||||||
# code: language=ansible-jinja
|
# code: language=ansible-jinja
|
||||||
127.0.0.1 localhost
|
127.0.0.1 localhost
|
||||||
127.0.1.1 {{ hostname }}
|
{{ ansible_host }} {{ fqdn }}
|
||||||
|
|
||||||
# The following lines are desirable for IPv6 capable hosts
|
# The following lines are desirable for IPv6 capable hosts
|
||||||
::1 ip6-localhost ip6-loopback
|
::1 ip6-localhost ip6-loopback
|
||||||
|
@ -10,7 +10,19 @@ ff02::1 ip6-allnodes
|
||||||
ff02::2 ip6-allrouters
|
ff02::2 ip6-allrouters
|
||||||
ff02::3 ip6-allhosts
|
ff02::3 ip6-allhosts
|
||||||
|
|
||||||
# Static hostnames for VMs
|
{% if hostname in groups['virtualservers'] %}
|
||||||
|
# Static hostnames for other VMs
|
||||||
{% for host in groups['virtualservers'] %}
|
{% for host in groups['virtualservers'] %}
|
||||||
{{ hostvars[host].private_ip }} {{ hostvars[host].fqdn }}
|
{{ hostvars[host].private_ip }} {{ hostvars[host].fqdn }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% elif hostname in groups['control_infr'] %}
|
||||||
|
# Static hostnames for VM hosts
|
||||||
|
{% for host in groups['vmhost_infr'] %}
|
||||||
|
{{ hostvars[host].ansible_host }} {{ hostvars[host].fqdn }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
# Static hostnames for VMs
|
||||||
|
{% for host in groups['virtualservers'] %}
|
||||||
|
{{ hostvars[host].ansible_host }} {{ hostvars[host].fqdn }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue