I am using a batch file to make installing chef on servers a little bit less work. The last line of my code where I add the recipe seems to be completely ignored. Probably something stupid but what am I missing?
@ECHO OFF
set /p ip="Enter IP Address:"
set /p nodename="Enter Node Name:"
ECHO OK, installing Chef node %nodename% on %ip%
knife bootstrap %ip% -x ************ -P ************* --sudo -N %nodename%
node-ssl-verify-mode none --no-host-key-verify
knife node run_list add %nodename% "recipe[*********]"
As mentioned above, we use .bat
wrappers for our executable Ruby scripts on Windows so to run them from another batch script you need call knife ...
. Also you don't need the run list add most likely, unless your recipes are very broken you can set the run list during the bootstrap.