1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

RabbitMQ 3.6.7 changed a couple of response codes (#22715)

This commit is contained in:
marlier 2017-06-08 07:33:30 -04:00 committed by John R Barker
parent 217c80ba7e
commit 6bd1681203
2 changed files with 4 additions and 2 deletions

View file

@ -204,7 +204,8 @@ def main():
elif module.params['state'] == 'absent':
r = requests.delete( url, auth = (module.params['login_user'],module.params['login_password']))
if r.status_code == 204:
# RabbitMQ 3.6.7 changed this response code from 204 to 201
if r.status_code == 204 or r.status_code == 201:
module.exit_json(
changed = True,
name = module.params['name']

View file

@ -252,7 +252,8 @@ def main():
elif module.params['state'] == 'absent':
r = requests.delete( url, auth = (module.params['login_user'],module.params['login_password']))
if r.status_code == 204:
# RabbitMQ 3.6.7 changed this response code from 204 to 201
if r.status_code == 204 or r.status_code == 201:
module.exit_json(
changed = True,
name = module.params['name']