consul_kv: add diff output in add_value method (state=present) when the value changed #28278
Labels
affects_2.3
This issue/PR affects Ansible v2.3
bot_closed
clustering
Clustering category
collection:community.general
collection
Related to Ansible Collections work
feature
This issue/PR relates to a feature request.
has_pr
This issue has an associated PR.
module
This issue/PR relates to a module.
needs_collection_redirect
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md
support:community
This issue/PR relates to code supported by the Ansible community.
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/clustering/consul_kv.py
ANSIBLE VERSION
ansible 2.3.0.0
ansible 2.4.0.0
SUMMARY
Currently the
consul_kv
module does not provide any extra diff output (when running ansible with the so useful--diff
option).Diff output (we could make it optional, by an extra optional parameter like 'diffView') should be easy to add using the
module.exit_json
diff
return attribute containing both the old and new value for the updated key, in following fashion:Note:
Untested codeUpdate: I've already tested the new
--diff
successfully in a duplicated consul_kv.py file. TODO make a PR etcThe text was updated successfully, but these errors were encountered: