From ce3e972ce8cf074b605271e1c80684304443ea48 Mon Sep 17 00:00:00 2001 From: Vincent VAN HOLLEBEKE Date: Sun, 24 Jan 2016 20:28:01 +0100 Subject: [PATCH] Do not fail when action is delete and volume is not present This prevents failing when a playbook describes a volume deletion and is launched more that once. Without this fix, if you run the playbook a second time, it will fail. --- system/gluster_volume.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/gluster_volume.py b/system/gluster_volume.py index d24930d7290..e0b1ef01708 100644 --- a/system/gluster_volume.py +++ b/system/gluster_volume.py @@ -433,7 +433,7 @@ def main(): else: module.fail_json(msg='failed to create volume %s' % volume_name) - if volume_name not in volumes: + if action != 'delete' and volume_name not in volumes: module.fail_json(msg='volume not found %s' % volume_name) if action == 'started':