diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-12-26 16:56:30 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-12-26 16:56:30 -0200 |
commit | b22fa8ca754906972a012f608c8ed7242b66ed1b (patch) | |
tree | 14f09ca2541538d68698781605fe85f00c96681f /manifests | |
parent | 889d8b951c5a55423f17a2bf44ae11354f45fe62 (diff) | |
download | puppet-virtual-b22fa8ca754906972a012f608c8ed7242b66ed1b.tar.gz puppet-virtual-b22fa8ca754906972a012f608c8ed7242b66ed1b.tar.bz2 |
Setting nodename according to hostname value
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/vserver.pp | 3 |
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": |