mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07: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:
parent
6291efd4ea
commit
9c02ade536
8 changed files with 184 additions and 9 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue