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:
Jon Bergli Heier 2018-12-04 13:42:18 +01:00 committed by John R Barker
parent 6291efd4ea
commit 9c02ade536
8 changed files with 184 additions and 9 deletions

View file

@ -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):