Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

jsonpatch

Adds jsonpatch command to edit JSON files on destination machine.

Updated file is written to destination pretty-printed with indent of 2 spaces and sorted keys.

Requirements

Optional requirement is commentjson Python module. Makes command jsonpatch work with comments inside JSON.

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
  roles:
     - jsonpatch
  tasks:
     - jsonpatch: file=/path/to/file/on/server key="first.second" value="new value"
     - jsonpatch: file=/path/to/file/on/server key="first.list" value={{ list_var }}

License

BSD

About

Ansible command for patching JSON files

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.