From b22fa8ca754906972a012f608c8ed7242b66ed1b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 26 Dec 2009 16:56:30 -0200 Subject: Setting nodename according to hostname value --- manifests/vserver.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/vserver.pp b/manifests/vserver.pp index ef4f01c..5611c27 100644 --- a/manifests/vserver.pp +++ b/manifests/vserver.pp @@ -150,6 +150,7 @@ define vserver($ensure, $context, $in_domain = '', $mark = '', $legacy = false, case $vs_name { '': { fail ( "Cannot create VServer with empty name" ) } } + $nodename = $hostname ? { false => $vs_name, default => $hostname } $if_dir = "/etc/vservers/${vs_name}/interfaces" $mark_file = "/etc/vservers/${vs_name}/apps/init/mark" @@ -216,7 +217,7 @@ define vserver($ensure, $context, $in_domain = '', $mark = '', $legacy = false, "/var/lib/puppet/modules/virtual/contexts/${context}": content => "\n"; "/etc/vservers/${vs_name}/uts/nodename": - content => "${vs_name}\n", + content => "${nodename}\n", notify => Exec["vs_restart_${vs_name}"], require => Exec["vs_create_${vs_name}"]; "/etc/vservers/${vs_name}/name": -- cgit v1.2.3