|
- {#-
- vim: syntax=jinja
- -#}
- {%- from "linux/map.jinja" import network with context -%}
- # hosts(1) file managed by salt-minion(1)
- # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
-
- {%- set hosts = {
- '127.0.0.1': [
- 'localhost'
- ],
- '127.0.1.1': [
- network.fqdn|default(grains.fqdn),
- network.hostname|default(grains.nodename)
- ],
- '::1': [
- 'ip6-localhost',
- 'ip6-loopback'
- ],
- 'fe00::0': [
- 'ip6-localnet',
- 'ip6-mcastprefix'
- ],
- 'ff02::1': [
- 'ip6-allnodes'
- ],
- 'ff02::2': [
- 'ip6-allrouters'
- ],
- 'ff02::3': [
- 'ip6-allhosts'
- ],
- } -%}
- {%- for name, host in network.host.iteritems() -%}
- {%- do hosts.update({host.address: host.names}) -%}
- {%- endfor %}
- {% for address, entries in hosts|dictsort %}
- {{ address }} {{ entries|join(' ') }}
- {%- endfor %}
|