I’m looking for a quick way to update a json file without needing to template the file. I want to be able to change the values each time a job is being run based on user input.
I tried this: http://www.geekytidbits.com/ansible-module-modify-json/
But was unsuccessful to get it working.
Thanks!
Will
Would the lineinfile module be sufficient? If you’re updating a single line in your JSON file, this seems appropriate.
or from_json filter, modify in ansible, and write it back.
what’s limiting the use of templates?
I’m using a replace to inject the values I get from the user. I just don’t really need a template for this one.