It is still matter of $PATH
and ssh - not chef-solo. Interactive and non-interactive sessions not necessarily have same value for the $PATH
variable. Same ssh problem is described here on stackoverflow. You may also check GNU bash manual to have deeper insight of (non-)interactive and (non-)login shells. To shorten, solution would be one of the following:
- Run chef-solo using absolute path. Here's how your command might look like:
- ssh root@188.xxx.xxx.xxx -t -C "/usr/local/ruby/bin/chef-solo -c /var/chef/solo.rb"
- Tune the .bash configuration files to load same
$PATH
variable for both interactive and non-interactive shells.
Note: To find out what's the absolute path, login to the machine via ssh and run which chef-solo
(Don't know how experienced you are with linux. Sorry if I'm underestimating your knowledge)