Is there a json module yet?

47 views
Skip to first unread message

Will LaSeur

unread,
May 2, 2016, 2:59:15 PM5/2/16
to Ansible Project
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.


But was unsuccessful to get it working.

Thanks!

Will

Dan Lang

unread,
May 3, 2016, 3:27:15 PM5/3/16
to Ansible Project
Would the lineinfile module be sufficient?  If you're updating a single line in your JSON file, this seems appropriate.   

ja...@blendlabs.com

unread,
May 4, 2016, 2:27:15 PM5/4/16
to Ansible Project
or from_json filter, modify in ansible, and write it back.

what's limiting the use of templates?

Will LaSeur

unread,
May 5, 2016, 1:12:31 PM5/5/16
to Ansible Project
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.
Reply all
Reply to author
Forward
0 new messages