From 5079caefee79ad3643d5b249c9cf4dda2f0696d9 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 29 Mar 2009 12:00:40 +0100 Subject: [PATCH] Start testing an /etc/hosts class Signed-off-by: Stephen Gran --- manifests/site.pp | 4 ++++ modules/hosts/manifests/init.pp | 7 +++++++ templates/etc-hosts.erb | 15 +++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 modules/hosts/manifests/init.pp create mode 100644 templates/etc-hosts.erb 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 -- 2.20.1