Bugfix : Fix RabbitMQ policy definition change check #51562
What does this PR do?
Fix the way the rabbitmq_policy.present state compares the existing policy definition to the given policy definition to define the changes to apply.
As this field is a json field, compare the dict objects generated by
What issues does this PR fix or reference?
Could not find any related issue.
An example state is defined like the following :
So, in the current state of the code, the definition from the state and the definition returned by
Policy definitions are compared as dictionnaries and not as strings, avoiding uneeded re-application of existing policy.
Commits signed with GPG?
@dwoz From what I can see, policies exist since version 3.0.0 of RabbitMQ (https://www.rabbitmq.com/changelog.html). So I tested with version 3.0 and it works perfectly. I also tested with the last released version of RabbitMQ (3.6.15) and it also works as expected.
Do you want me to run more extensive tests ?