mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
rabbitmq_binding: Add support for state=absent (#48599)
* rabbitmq_binding: Add support for state=absent * Add integration tests for rabbitmq_binding * Update testcases * Add changelog fragment
This commit is contained in:
committed by
John R Barker
parent
6291efd4ea
commit
9c02ade536
@@ -27,7 +27,6 @@ options:
|
||||
state:
|
||||
description:
|
||||
- Whether the bindings should be present or absent.
|
||||
- Only present implemented at the momemt.
|
||||
choices: [ "present", "absent" ]
|
||||
default: present
|
||||
name:
|
||||
@@ -159,6 +158,9 @@ class RabbitMqBinding(object):
|
||||
if self.module.params['state'] == 'present':
|
||||
if not self.is_present():
|
||||
return True
|
||||
elif self.module.params['state'] == 'absent':
|
||||
if self.is_present():
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_present(self):
|
||||
|
||||
Reference in New Issue
Block a user