From 3fd51734137b32c8c01a5b2902783e21de783035 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. --- lib/ansible/modules/extras/system/gluster_volume.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/system/gluster_volume.py b/lib/ansible/modules/extras/system/gluster_volume.py index d24930d729..e0b1ef0170 100644 --- a/lib/ansible/modules/extras/system/gluster_volume.py +++ b/lib/ansible/modules/extras/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':