opscode-cookbooks/rabbitmq — pull request #31 by milosgajdos83 (2013-01-03 17:15:41+00:00)
Title: COOK-2153 Fixed idempotence issues with user LWRP

By incorrectly I mean it was using incorrect combination of
list_user_permissions command which was making the LWRP to be
NON-idempotent and was setting the permissions when they already
have been set. According to docs the correct commands are:

list_user_permissions [-p ]

ie. you MUST supply the username as it's a mandatory argument.

Examples:

[sensu] ~ $ sudo rabbitmqctl list_user_permissions |foo
Error: invalid command 'list_user_permissions'
[sensu] ~ $ sudo rabbitmqctl list_user_permissions |sensu
Error: invalid command 'list_user_permissions'
[sensu] ~ $ sudo rabbitmqctl list_user_permissions sensu
Listing permissions for user "sensu" ...
/sensu	.*	.*	.*
...done.
[sensu] ~ $ sudo rabbitmqctl list_user_permissions -p /sensu sensu
Listing permissions for user "sensu" ...
/sensu	.*	.*	.*
...done.
[sensu] ~ $