From 3c8a8802156903a8bebd70804d6a5ebad38d267b Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Mon, 5 Nov 2007 22:22:05 +0000 Subject: fix the delete method --- manifests/vserver.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'manifests') 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}", } } } -- cgit v1.2.3