Hello All,
I want to use the rabbitmq_user module to remove the default guest user. My
task is:
- name: delete rabbitmq guest user
rabbitmq_user: user=guest state=absent
This works the first time around when the guest user exists. However, when
running this a second time I get the following error:
Traceback (most recent call last):
File
"/home/centos/.ansible/tmp/ansible-tmp-1440685310.89-270486972930416/rabbitmq_user"
, line 1843, in <module>
main()
File
"/home/centos/.ansible/tmp/ansible-tmp-1440685310.89-270486972930416/rabbitmq_user"
, line 221, in main
if rabbitmq_user.get():
File
"/home/centos/.ansible/tmp/ansible-tmp-1440685310.89-270486972930416/rabbitmq_user"
, line 139, in get
user, tags = user_tag.split('\t')
ValueError: need more than 1 value to unpackEnter code here...
It's failing on this line:
https://github.com/ansible/ansible-modules-extras/blob/devel/messaging/rabbitmq_user.py#L139
This is failing because `rabbitmqctl list_users` will also return the last
login time of the user which does not contain '\t'. Since we're splitting
by '\t' we should first check if '\t' exists in the string before splitting.
I'm not sure if this has always been the behavior or has changed but I'm
using RabbitMQ version 3.1.5. I can make a PR for this change unless a more
elegant solution can be suggested.
Regards,
Mike
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1a4a4d39-c6a8-41b2-a65d-1a43bf3d84c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.