knife-inspect
is a knife plugin that inspects your chef repo as it
compares to what is on your chef server. You can inspect your entire repo,
or individual components.
$ gem install knife-inspect
$ cd [chef repo]
knife inspect
knife cookbook inspect [--no-cookbooks --no-data-bags --no-data-bag-items --no-environments --no-roles]
knife cookbook inspect [COOKBOOK]
knife data bag inspect
knife data bag inspect [BAG]
knife data bag inspect [BAG] [ITEM]
knife environment inspect
knife environment inspect [ENVIRONMENT]
knife role inspect
knife role inspect [ROLE]
So far it checks if...
You can use the option switches to disable checking for a resource type when
running knife inspect
:
--no-cookbooks
--no-data-bags
--no-data-bag-items
--no-environments
--no-roles
You can use it with your favorite Continuous Integration tool, it returns 0 when everything is in sync or 1 if it's not.
knife diff
seems to expect local roles to be json files, knife-inspect supports both JSON and Ruby.knife diff
(Only in .: clients
for example)knife diff
command.This gem is tested with Ruby 2.3 and has been tested with Chef 13, 12 and 11.
(in alphabetical order)
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)