Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Add an option to create a data bag from JSON data in a file #10
An option --json-file is added that takes a file path. I.e. $ knife solo data bag create my_bag my_item --json-file foo.json The file's contents are loaded and used as the contents of the new data bag.
I forgot to mention the motivation!
$ knife solo data bag show my_bag my_item -F json > foo.json
...copy to another project/edit as clear text...
$ knife solo data bag create my_bag my_item --json-file foo.json