mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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.
This commit is contained in:
committed by
Matt Clay
parent
89baffa06f
commit
3fd5173413
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user