summaryrefslogtreecommitdiff
path: root/puppet/modules/site_config/manifests
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2012-12-11 13:10:30 -0500
committerMicah Anderson <micah@riseup.net>2012-12-11 13:10:30 -0500
commit090dca27921efe22fdc39c8598356bfb74e5fe99 (patch)
tree7856c63536a413b5f060285c6caa00043aa272a3 /puppet/modules/site_config/manifests
parente8f28cf269fe706ed556f84d6e03d6a574dfa26d (diff)
setup /etc/hosts based on a template and the hiera value 'hosts'
This will replace the existing /etc/hosts, so we will want to make this more smart later
Diffstat (limited to 'puppet/modules/site_config/manifests')
-rw-r--r--puppet/modules/site_config/manifests/hosts.pp7
-rw-r--r--puppet/modules/site_config/manifests/init.pp3
2 files changed, 10 insertions, 0 deletions
diff --git a/puppet/modules/site_config/manifests/hosts.pp b/puppet/modules/site_config/manifests/hosts.pp
new file mode 100644
index 00000000..08890a5d
--- /dev/null
+++ b/puppet/modules/site_config/manifests/hosts.pp
@@ -0,0 +1,7 @@
+class site_config::hosts {
+
+ file { '/etc/hosts':
+ content => template('site_config/hosts'),
+ mode => '0644', owner => root, group => root;
+ }
+}
diff --git a/puppet/modules/site_config/manifests/init.pp b/puppet/modules/site_config/manifests/init.pp
index 7f67ad4e..268ff2fc 100644
--- a/puppet/modules/site_config/manifests/init.pp
+++ b/puppet/modules/site_config/manifests/init.pp
@@ -11,4 +11,7 @@ class site_config {
# configure /etc/resolv.conf
include site_config::resolvconf
+
+ # configure /etc/hosts
+ include site_config::hosts
}