diff options
-rw-r--r-- | manifests/vserver.pp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp index 968e949..c4f4d82 100644 --- a/manifests/vserver.pp +++ b/manifests/vserver.pp @@ -51,7 +51,7 @@ define vserver($ensure, $context, $in_domain = '', $mark = '', $legacy = false, present: { vs_create{$name: in_domain => $in_domain, legacy => $legacy, distro => $distro, } } running: { vs_create{$name: in_domain => $in_domain, legacy => $legacy, distro => $distro, } } stopped: { vs_create{$name: in_domain => $in_domain, legacy => $legacy, distro => $distro, } } - absent: { vs_create{$name: in_domain => $in_domain, legacy => $legacy, distro => $distro, } } + delete: { vs_create{$name: in_domain => $in_domain, legacy => $legacy, distro => $distro, } } default: { err("${fqdn}: vserver(${vs_name}): unknown ensure '${ensure}'") } } @@ -127,9 +127,9 @@ define vserver($ensure, $context, $in_domain = '', $mark = '', $legacy = false, file { $mark_file: ensure => absent, } } - absent: { - exec { "vserver ${vs_name} delete": - onlyif => "test -e \$(readlink -f /etc/vservers/${vs_name}/run || echo /doesntexist )", + delete: { + exec { "/usr/bin/yes | vserver ${vs_name} delete": + alias => "vs_restart_${vs_name}", } } } |