From: Stephen Gran Date: Sun, 29 Mar 2009 11:00:40 +0000 (+0100) Subject: Start testing an /etc/hosts class X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=5079caefee79ad3643d5b249c9cf4dda2f0696d9;hp=06e2c51c445032b5df139a2f9c2b356dade19743;p=mirror%2Fdsa-puppet.git Start testing an /etc/hosts class Signed-off-by: Stephen Gran --- diff --git a/manifests/site.pp b/manifests/site.pp index 578da32cc..d39b948ba 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -24,3 +24,7 @@ node default { default: {} } } + +node penalosa.debian.org inherits default { + include hosts +} diff --git a/modules/hosts/manifests/init.pp b/modules/hosts/manifests/init.pp new file mode 100644 index 000000000..468107dc0 --- /dev/null +++ b/modules/hosts/manifests/init.pp @@ -0,0 +1,7 @@ +class hosts { + + file { + "/etc/hosts": content => template("etc-hosts.erb"); + } +} + diff --git a/templates/etc-hosts.erb b/templates/etc-hosts.erb new file mode 100644 index 000000000..868984368 --- /dev/null +++ b/templates/etc-hosts.erb @@ -0,0 +1,15 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +127.0.0.1 localhost +<%= ipaddress %> <%= fqdn %> <%= hostname %> + +# The following lines are desirable for IPv6 capable hosts +::1 ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +ff02::3 ip6-allhosts