Sadly the rabbitmq user module doesn't return data consistently in both a success and failure scenario so there's no easy way to intelligently allow the module to fail if there is an issue. In this case, because we're looking to simply nuke the guest user, I'm thinking the `failed_when: false` option is the best way forward but I'm also open to a better way if we can think of one.
Sadly the rabbitmq user module doesn't return data consistently in both a success and failure scenario so there's no easy way to intelligently allow the module to fail if there is an issue. In this case, because we're looking to simply nuke the guest user, I'm thinking the `failed_when: false` option is the best way forward but I'm also open to a better way if we can think of one.
Data from the module for success and failure: mq_container- bb27526c] => {
"rabbitguest" : { rabbitmqctl -q -n rabbit delete_user guest",
"failed" : false,
"failed_ when_result" : false,
"invocatio n": {
"module_ args": "",
"module_ name": "rabbitmq_user"
"stderr" : "Error: no_such_user: guest\n",
"stdout" : "",
"stdout_ lines": [] mq_container- 5d9b0cfc] => {
"rabbitguest" : {
"changed" : true,
"failed" : false,
"failed_ when_result" : false,
"invocatio n": {
"module_ args": "",
"module_ name": "rabbitmq_user"
"state" : "absent", mq_container- e8e4279d] => {
"rabbitguest" : { rabbitmqctl -q -n rabbit delete_user guest",
"failed" : false,
"failed_ when_result" : false,
"invocatio n": {
"module_ args": "",
"module_ name": "rabbitmq_user"
"stderr" : "Error: no_such_user: guest\n",
"stdout" : "",
"stdout_ lines": []
ok: [aio1_rabbit_
"var": {
"cmd": "/usr/sbin/
},
"msg": "Error: no_such_user: guest",
"rc": 2,
}
}
}
ok: [aio1_rabbit_
"var": {
},
"user": "guest"
}
}
}
ok: [aio1_rabbit_
"var": {
"cmd": "/usr/sbin/
},
"msg": "Error: no_such_user: guest",
"rc": 2,
}
}
}