aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems/hosts.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-25 11:32:26 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-25 11:32:26 -0200
commit56521d2de636f5869de3fd47587faeacc27017ec (patch)
tree14af7b1ac155875242d725eb5863ae04814525ab /manifests/subsystems/hosts.pp
parentea24ef0ab5f15019bf12f4757be35f2f21640fa8 (diff)
downloadpuppet-nodo-56521d2de636f5869de3fd47587faeacc27017ec.tar.gz
puppet-nodo-56521d2de636f5869de3fd47587faeacc27017ec.tar.bz2
Setting nodo::sshd_print_motd as false by default
Diffstat (limited to 'manifests/subsystems/hosts.pp')
-rw-r--r--manifests/subsystems/hosts.pp14
1 files changed, 8 insertions, 6 deletions
diff --git a/manifests/subsystems/hosts.pp b/manifests/subsystems/hosts.pp
index e1833ea..9453853 100644
--- a/manifests/subsystems/hosts.pp
+++ b/manifests/subsystems/hosts.pp
@@ -1,21 +1,23 @@
-class hosts {
+class hosts(
+ $custom = hiera('nodo::hosts::custom', false)
+) {
# Sometimes might be useful to manage the whole
# hosts file, see http://projects.puppetlabs.com/issues/10704
- case $nodo_custom_hosts_file {
+ case $custom {
true: {
file { '/etc/hosts':
ensure => present,
owner => root,
group => root,
mode => 0640,
- source => "puppet:///modules/site_nodo/hosts/$fqdn",
+ source => "puppet:///modules/site_nodo/hosts/${::fqdn}",
}
}
default: {
- host { "$hostname":
+ host { "${::hostname}":
ensure => present,
- ip => "$ipaddress",
- host_aliases => [ "$fqdn" ],
+ ip => "${::ipaddress}",
+ host_aliases => [ "${::fqdn}" ],
}
host { "localhost":