summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@chef.io>2019-12-18 13:24:41 -0800
committerGitHub <noreply@github.com>2019-12-18 13:24:41 -0800
commit2396e9fb9d892beeecddd026b90b263cce1674a1 (patch)
tree6b2375c0febbfe3c124d92ee5b5e8ad32bfa51b9
parent4df4fd2ddfdf6169ac3b297088bff8e2a1ce5ef6 (diff)
parentb97caf5a48cf50dfcf17da2af30a9a0198cd6ae5 (diff)
downloadchef-2396e9fb9d892beeecddd026b90b263cce1674a1.tar.gz
add new option bootstrap_product for install cinc via bootstrap (#9112)
add new option bootstrap_product for install cinc via bootstrap
-rw-r--r--lib/chef/knife/bootstrap.rb5
-rw-r--r--lib/chef/knife/bootstrap/templates/chef-full.erb2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index d4e98e3dec..3279f7970a 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -296,6 +296,11 @@ class Chef
description: "URL to a custom installation script.",
proc: Proc.new { |u| Chef::Config[:knife][:bootstrap_url] = u }
+ option :bootstrap_product,
+ long: "--bootstrap-product PRODUCT",
+ description: "Product to install.",
+ default: "chef"
+
option :msi_url, # Windows target only
short: "-m URL",
long: "--msi-url URL",
diff --git a/lib/chef/knife/bootstrap/templates/chef-full.erb b/lib/chef/knife/bootstrap/templates/chef-full.erb
index b0476c8d57..febc414b13 100644
--- a/lib/chef/knife/bootstrap/templates/chef-full.erb
+++ b/lib/chef/knife/bootstrap/templates/chef-full.erb
@@ -177,7 +177,7 @@ do_download() {
else
echo "-----> Installing Chef Omnibus (<%= @config[:channel] %>/<%= version_to_install %>)"
do_download ${install_sh} $tmp_dir/install.sh
- sh $tmp_dir/install.sh -P chef -c <%= @config[:channel] %> -v <%= version_to_install %>
+ sh $tmp_dir/install.sh -P <%= @config[:bootstrap_product] %> -c <%= @config[:channel] %> -v <%= version_to_install %>
fi
<% end %>