]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding hosts class
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 18 Apr 2010 18:17:59 +0000 (15:17 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 18 Apr 2010 18:17:59 +0000 (15:17 -0300)
manifests/init.pp
manifests/nodo.pp
manifests/subsystems/hosts.pp [new file with mode: 0644]

index 0e42f43960ae24b363b767d2c4b158d37bd5fdbc..9c480598b98f0892ec77dcc59ecd758c46600871 100644 (file)
@@ -18,6 +18,7 @@ import "subsystems/munin.pp"
 import "subsystems/pam.pp"
 import "subsystems/xorg.pp"
 import "subsystems/modprobe.pp"
+import "subsystems/hosts.pp"
 
 # Import nodo classes
 import "nodo.pp"
index 5e5436e15d08d8ed8f1fd290c50837ef363406f8..1b0b012bd095c47ff39301254808e7c9607e87d8 100644 (file)
@@ -8,6 +8,7 @@ class nodo {
   include motd
   include utils
   include cron
+  include hosts
 
   # Set timezone and ntp config
   #
@@ -44,12 +45,6 @@ class nodo {
     content => "$fqdn\n",
   }
 
-  host { "$hostname":
-    ensure => present,
-    ip     => "$ipaddress",
-    alias  => [ "$fqdn" ],
-  }
-
   file { "/etc/rc.local":
     source  => "puppet://$server/modules/nodo/etc/rc.local",
     owner   => "root",
diff --git a/manifests/subsystems/hosts.pp b/manifests/subsystems/hosts.pp
new file mode 100644 (file)
index 0000000..223c523
--- /dev/null
@@ -0,0 +1,38 @@
+class hosts {
+  host { "$hostname":
+    ensure => present,
+    ip     => "$ipaddress",
+    alias  => [ "$fqdn" ],
+  }
+
+  host { "ip6-localhost":
+    ensure => present,
+    ip     => "::1",
+    alias  => [ "ip6-loopback" ],
+  }
+
+  host { "ip6-localnet":
+    ensure => present,
+    ip     => "fe00::0",
+  }
+
+  host { "ip6-mcastprefix":
+    ensure => present,
+    ip     => "ff00::0",
+  }
+
+  host { "ip6-allnodes":
+    ensure => present,
+    ip     => "ff02::1",
+  }
+
+  host { "ip6-allrouters":
+    ensure => present,
+    ip     => "ff02::2",
+  }
+
+  host { "ip6-allhosts":
+    ensure => present,
+    ip     => "ff02::3",
+  }
+}