From 19229fcee52b1843341efcdba5715d246dd77ab8 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 18 Apr 2010 15:17:59 -0300 Subject: Adding hosts class --- manifests/init.pp | 1 + manifests/nodo.pp | 7 +------ manifests/subsystems/hosts.pp | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 manifests/subsystems/hosts.pp (limited to 'manifests') 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", + } +} -- cgit v1.2.3