]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Start testing an /etc/hosts class
authorStephen Gran <steve@lobefin.net>
Sun, 29 Mar 2009 11:00:40 +0000 (12:00 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 29 Mar 2009 11:00:40 +0000 (12:00 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
manifests/site.pp
modules/hosts/manifests/init.pp [new file with mode: 0644]
templates/etc-hosts.erb [new file with mode: 0644]

index 578da32ccc51572cc2595b18a43f817ffac6f673..d39b948babd5eb62c9964184749ba29da66983ae 100644 (file)
@@ -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 (file)
index 0000000..468107d
--- /dev/null
@@ -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 (file)
index 0000000..8689843
--- /dev/null
@@ -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