This is jenkins plugin to run chef-client on remote host
This is jenkins plugin to run chef-client on remote host. Plugin starts ssh session on remote host using public key authentication and run chef-client there.
Use chef_json_template to define chef attributes and run list. If you define one, plugin will parse chef_json_template data and stored result in file which in turn will passed as -j parameter into chef-client run.
Please check out chef wiki to learn more about chef json files.
Chef_json_template confirms ERB template syntax. Here is example of chef_json_template:
<%
runlist = %w{apache::server mysql}
chef_json = {
:run_list => runlist.map { |r| "recipe[#{r}]" } ,
:apache => {
:version => 80
}
}
%>
<%= chef_json.to_json.to_s %>
You can set some environment variables qith "Jenkins/Configuration/Global properties/Environment variables" . Here the list of varibales to be processed in the plugin: