chef - Cookbook to run .bat file with parameters -
i have .bat script deployment task. needed run parameters correct work, smthg this:
script.bat -x=param1 -b=param2 -c=param3
( how looks in cmd on windows )
how correctly specify cookbook run such script? seen done .sh no .bat (yes, need .bat not cmd or ps1) if isn't hard, give example. thx
i use batch ressource this
batch "run-script" command "script.bat -x=param1 -b=param2 -c=param3" cwd "path script is" action :nothing end
and use notification deployment ressource use
notifies :run, "bash[run-script]", :immediately
if deployment ressource correctly idempotent script run if deploy succeed.
fwiw .bat or .cmd roughtly same thing, see windows batch files: .bat vs .cmd?
Comments
Post a Comment