suffix cache path with target_host

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-14 09:47:59 +02:00
parent 1c1cff37e3
commit 9f231a9ce7

View file

@ -54,10 +54,11 @@ class ConfigInstall(object):
def cleanup(self): def cleanup(self):
# FIXME: move to local? # FIXME: move to local?
self.log.debug("Saving " + self.local.out_path + " to " + self.local.cache_path) destination = os.path.join(self.local.cache_path, self.context.target_host)
if os.path.exists(self.local.cache_path): self.log.debug("Saving " + self.local.out_path + " to " + destination)
shutil.rmtree(self.local.cache_path) if os.path.exists(destination):
shutil.move(self.local.out_path, self.local.cache_path) shutil.rmtree(destination)
shutil.move(self.local.out_path, destination)
def deploy_to(self): def deploy_to(self):
"""Mimic the old deploy to: Deploy to one host""" """Mimic the old deploy to: Deploy to one host"""