koji-ansible
koji-ansible copied to clipboard
external-repos management is not idempotent due to trailing slash
That is added by Koji, so if you try to pass URL in ansible without trailing slash it is always shown as changed. Probably the module should automatically add trailing slash regardless of what user wants...
Thanks for this bug report.
I'm hesitant to make the Ansible module too "smart" in this case. I'm thinking that we should just require the user to always set a value with a "slash" at the end if they want their play to be idempotent.
The documentation has this section:
- For idempotency, please ensure your url always ends with a "/"
character. If you leave it out, Koji Hub will automatically add a "/"
slash when storing this value in the database, and every subsequent
Ansible run will appear to be "changing" the external repo's URL.
What do you think?
...I will think about this some more. Maybe this is too bad of a papercut to force users to read the docs.
I think as long as we mirror what koji would do, it would be safe.
TODO: integration tests