diff options
author | Claire McQuin <claire@getchef.com> | 2014-05-08 10:09:01 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-05-08 15:37:48 -0700 |
commit | 2481b6740b6de0ede97574e422dd2980a27b8363 (patch) | |
tree | 9e77640b94aee3f36aa0bfc5c9b47f51326b356d /lib/chef/knife/bootstrap | |
parent | ca384a949df634ef1a2a1cd27df77c9fca02e097 (diff) | |
download | chef-2481b6740b6de0ede97574e422dd2980a27b8363.tar.gz |
add knife options for chef-full customization
Diffstat (limited to 'lib/chef/knife/bootstrap')
-rw-r--r-- | lib/chef/knife/bootstrap/chef-full.erb | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/chef/knife/bootstrap/chef-full.erb b/lib/chef/knife/bootstrap/chef-full.erb index 1d75117b72..c0b8d54dad 100644 --- a/lib/chef/knife/bootstrap/chef-full.erb +++ b/lib/chef/knife/bootstrap/chef-full.erb @@ -19,20 +19,23 @@ exists() { fi } -install_sh="https://www.opscode.com/chef/install.sh" -version_string="-v <%= chef_version %>" - -if ! exists /usr/bin/chef-client; then - echo "Installing Chef Client..." - if exists wget; then - bash <(wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %> ${install_sh} -O -) ${version_string} - elif exists curl; then - bash <(curl -L <%= "--proxy \"#{knife_config[:bootstrap_proxy]}\" " if knife_config[:bootstrap_proxy] %> ${install_sh}) ${version_string} - else - echo "Neither wget nor curl found. Please install one and try again." >&2 - exit 1 +<% if knife_config[:bootstrap_install_command] %> + <%= knife_config[:bootstrap_install_command] %> +<% else %> + install_sh="<%= knife_config[:bootstrap_url] ? knife_config[:bootstrap_url] : "https://www.opscode.com/chef/install.sh" %>" + version_string="-v <%= chef_version %>" + if ! exists /usr/bin/chef-client; then + echo "Installing Chef Client..." + if exists wget; then + bash <(wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %> <%= knife_config[:bootstrap_wget_options] %> ${install_sh} -O -) ${version_string} + elif exists curl; then + bash <(curl -L <%= "--proxy \"#{knife_config[:bootstrap_proxy]}\" " if knife_config[:bootstrap_proxy] %> <%= knife_config[:bootstrap_curl_options] %> ${install_sh}) ${version_string} + else + echo "Neither wget nor curl found. Please install one and try again." >&2 + exit 1 + fi fi -fi +<% end %> mkdir -p /etc/chef |