summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiguel Duarte Barroso <39051226+maiqueb@users.noreply.github.com>2018-12-20 12:49:52 +0100
committerJohn R Barker <john@johnrbarker.com>2018-12-20 11:49:52 +0000
commit4951e5a5b716766936af9d1d01f26a7dcfc43066 (patch)
tree193cee7888a0b1db73391820e6f4ba0d91ba4122 /lib
parentbcae7f24cbae60bc7195ba60a8df07001a2409a9 (diff)
downloadansible-4951e5a5b716766936af9d1d01f26a7dcfc43066.tar.gz
os_security_group_rule proper module exit (#50076)
When the security group the rule belongs to does not exist and the state is absent, the module is not properly exited, leading to a playbook execution failure. Fixes issue #50057
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/modules/cloud/openstack/os_security_group_rule.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/modules/cloud/openstack/os_security_group_rule.py b/lib/ansible/modules/cloud/openstack/os_security_group_rule.py
index b932617969..af5e1b8a44 100644
--- a/lib/ansible/modules/cloud/openstack/os_security_group_rule.py
+++ b/lib/ansible/modules/cloud/openstack/os_security_group_rule.py
@@ -359,7 +359,7 @@ def main():
cloud.delete_security_group_rule(rule['id'])
changed = True
- module.exit_json(changed=changed)
+ module.exit_json(changed=changed)
except sdk.exceptions.OpenStackCloudException as e:
module.fail_json(msg=str(e))