aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-04-18 15:17:59 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-04-18 15:17:59 -0300
commit19229fcee52b1843341efcdba5715d246dd77ab8 (patch)
treee7c92ae1c66e41d6736718d7e1c13be014bce2c5 /manifests
parentafe483773913f207ffbf2693f36bf852141da317 (diff)
downloadpuppet-nodo-19229fcee52b1843341efcdba5715d246dd77ab8.tar.gz
puppet-nodo-19229fcee52b1843341efcdba5715d246dd77ab8.tar.bz2
Adding hosts class
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/nodo.pp7
-rw-r--r--manifests/subsystems/hosts.pp38
3 files changed, 40 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 0e42f43..9c48059 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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"
diff --git a/manifests/nodo.pp b/manifests/nodo.pp
index 5e5436e..1b0b012 100644
--- a/manifests/nodo.pp
+++ b/manifests/nodo.pp
@@ -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
index 0000000..223c523
--- /dev/null
+++ b/manifests/subsystems/hosts.pp
@@ -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",
+ }
+}