When uploading a data bag to chef client is it possible to see what has changed, or what the difference is between a local file and the server?
Asked
Active
Viewed 1,258 times
1
-
1Try the "knife diff" command: See http://docs.opscode.com/knife_diff.html – Mark O'Connor Jan 28 '14 at 21:26
2 Answers
0
To view what is currently on the server:
knife data bag show <name> <data bag id> --secret-file <path_to_key>
You can drop the secret-file portion if you're not encrypting your passwords. If you want to drop it out to a json file so you can do the diff yourself it's:
knife data bag show <name> <data bag id> --format json --secret-file <path_to_key> > /tmp/data_bag_contents.json

Display Name is missing
- 6,197
- 3
- 34
- 46