aboutsummaryrefslogtreecommitdiff
path: root/manifests/vserver.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-12-26 16:56:30 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-12-26 16:56:30 -0200
commitb22fa8ca754906972a012f608c8ed7242b66ed1b (patch)
tree14f09ca2541538d68698781605fe85f00c96681f /manifests/vserver.pp
parent889d8b951c5a55423f17a2bf44ae11354f45fe62 (diff)
downloadpuppet-virtual-b22fa8ca754906972a012f608c8ed7242b66ed1b.tar.gz
puppet-virtual-b22fa8ca754906972a012f608c8ed7242b66ed1b.tar.bz2
Setting nodename according to hostname value
Diffstat (limited to 'manifests/vserver.pp')
-rw-r--r--manifests/vserver.pp3
1 files changed, 2 insertions, 1 deletions
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":