Signed-off-by: Rene Jochum <rene@jochums.at>pull/9/head
@@ -0,0 +1,14 @@ | |||
#!jinja|yaml | |||
# vi: set ft=yaml.jinja : | |||
{% if salt['pillar.get']('network:hostsfile:fqdn', False) %} | |||
network_hostsfile: | |||
file: | |||
- managed | |||
- name: /etc/hosts | |||
- source: salt://network/templates/etc_hosts.jinja | |||
- template: jinja | |||
- context: | |||
fqdn: {{ salt['pillar.get']('network:hostsfile:fqdn') }} | |||
hostname: {{ salt['pillar.get']('network:hostsfile:hostname') }} | |||
{% endif %} |
@@ -0,0 +1,11 @@ | |||
# This file is managed by salt, do not edit! | |||
127.0.0.1 localhost.localdomain | |||
127.0.1.1 {{ fqdn }} {{ hostname }} | |||
# The following lines are desirable for IPv6 capable hosts | |||
::1 ip6-localhost ip6-loopback localhost | |||
fe00::0 ip6-localnet | |||
ff00::0 ip6-mcastprefix | |||
ff02::1 ip6-allnodes | |||
ff02::2 ip6-allrouters | |||
ff02::3 ip6-allhosts |