mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Pep8 fixes for rabbitmq modules (#24590)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
85fc4c67ef
commit
f7321a87ca
9 changed files with 192 additions and 207 deletions
|
@ -123,24 +123,22 @@ def main():
|
|||
tracing = module.params['tracing']
|
||||
state = module.params['state']
|
||||
node = module.params['node']
|
||||
|
||||
result = dict(changed=False, name=name, state=state)
|
||||
rabbitmq_vhost = RabbitMqVhost(module, name, tracing, node)
|
||||
|
||||
changed = False
|
||||
if rabbitmq_vhost.get():
|
||||
if state == 'absent':
|
||||
rabbitmq_vhost.delete()
|
||||
changed = True
|
||||
result['changed'] = True
|
||||
else:
|
||||
if rabbitmq_vhost.set_tracing():
|
||||
changed = True
|
||||
result['changed'] = True
|
||||
elif state == 'present':
|
||||
rabbitmq_vhost.add()
|
||||
rabbitmq_vhost.set_tracing()
|
||||
changed = True
|
||||
|
||||
module.exit_json(changed=changed, name=name, state=state)
|
||||
result['changed'] = True
|
||||
|
||||
module.exit_json(**result)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue