From 7c2f248649c526a52c53e478b46f76b0e6f7d2e9 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sun, 7 Jul 2013 19:32:13 +0200 Subject: [PATCH] Wrap EBS specific tasks in an if block --- providers/ec2/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/providers/ec2/__init__.py b/providers/ec2/__init__.py index 412b90f..148ea58 100644 --- a/providers/ec2/__init__.py +++ b/providers/ec2/__init__.py @@ -65,9 +65,10 @@ def tasks(tasklist, manifest): apt.EnableDaemonAutostart(), filesystem.UnmountSpecials(), filesystem.UnmountVolume(), - ebs.DetachVolume(), - filesystem.DeleteMountDir(), - ebs.CreateSnapshot()) + filesystem.DeleteMountDir()) + if manifest.volume['backing'].lower() == 'ebs': + tasklist.add(ebs.DetachVolume(), + ebs.CreateSnapshot()) from common.tasks import TriggerRollback tasklist.add(TriggerRollback())