diff --git a/hshbase/defaults.yaml b/hshbase/defaults.yaml index f8fa2c2659ba01dc7c7a720153c9083e5a42f7f8..71222b4c69f8470fa07a3cfc4137d5937e78d54f 100644 --- a/hshbase/defaults.yaml +++ b/hshbase/defaults.yaml @@ -14,3 +14,4 @@ hshbase: dns: - 192.108.52.10 - 141.71.2.121 + hosts: {} diff --git a/hshbase/hostname/files/hosts b/hshbase/hostname/files/hosts index 20d45e379eedbb3aea67ec3d1b73603940493347..394055ddc533a9904597a9adeda4e165b81c3d81 100644 --- a/hshbase/hostname/files/hosts +++ b/hshbase/hostname/files/hosts @@ -1,3 +1,6 @@ +{% from "hshbase/map.jinja" import hshbase with context %} + + - pkgs: {{ hshbase.apt.pkgs }} ### THIS FILE IS MANAGED BY SALT! ### YOUR CHANGES WILL BE OVERWRITTEN! 127.0.0.1 localhost @@ -18,3 +21,7 @@ ff02::2 ip6-allrouters {{ ip }} {{ fqdn }} {{ localname }} {%- endif %} {%- endfor %} + +{% for fqdn, ip in hshbase.hosts.items() %} +{{ ip }} {{ fqdn }} +{% endfor %} diff --git a/pillar.example b/pillar.example index 3030e096d8b31c1334c3d4be9fd10080c8fc9ff6..7832b6e97885f605caa0d858290a82f7dab62adc 100644 --- a/pillar.example +++ b/pillar.example @@ -4,3 +4,5 @@ hshbase: proxy_address: http://apt-proxy.it.hs-hannover.de:8080 pkgs: [pwgen, tree] openvmtools: True + hosts: + foobar.example.com: 123.45.67.89