particledecay / ansible-jsonpatch

An Ansible module for patching JSON files
MIT License
118 stars 27 forks source link

wish: support --diff #9

Closed tpo closed 4 years ago

tpo commented 5 years ago

json_patch works as advertized:

$ ansible-playbook rojava.yml --check --diff

PLAY [rojava] **********************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************************************
ok: [rojava]

TASK [service : enable alerts] ****************************************************************************************************************************************************************************************
changed: [rojava]

PLAY RECAP *************************************************************************************************************************************************************************************************************************
rojava                     : ok=2    changed=1    unreachable=0    failed=0   

However it'd be very nice, if it could display the diff of what it would have done.

Thanks, *t

mastervolkov commented 4 years ago

@tpo Can you test my change in pull request https://github.com/particledecay/ansible-jsonpatch/pull/13 . Simple, but work for me

mastervolkov commented 4 years ago

@tpo Changes in master. You can test and close issue

tpo commented 4 years ago

@mastervolkov 's patch has landed in master. Thanks a lot @mastervolkov & @particledecay -> closing