Can I run chef-shell
as chef-client when my chef-client is running in chef-zero (chef-local) mode?
The parameter used to run chef-client
in zero mode is -z
. However using -z
with chef-shell
just makes it run in chef-client mode...
Can I run chef-shell
as chef-client when my chef-client is running in chef-zero (chef-local) mode?
The parameter used to run chef-client
in zero mode is -z
. However using -z
with chef-shell
just makes it run in chef-client mode...
You need to start chef-zero as it's own process, and then point chef-shell's server config at the running chef-zero.
See this example:
In one terminal:
In another terminal:
You could also create a new
client.rb
file and use:chef-shell -z -c /path/to/client.rb
Mike's answer is correct.
When doing this on test-kitchen nodes I use the following "script" which also populates the chef-zero with the necessary cookbooks, etc.
I've created a feature request for simplifying this which you may wish to vote for.