diff options
author | sawanoboly <sawanoboriyu@higanworks.com> | 2019-11-19 14:59:13 +0900 |
---|---|---|
committer | sawanoboly <sawanoboriyu@higanworks.com> | 2019-11-21 13:18:38 +0900 |
commit | e0408de463ab9b2138d11f39fadf0034fe7eb830 (patch) | |
tree | f302eee36a704f470f346c2b59730acf4a154c52 /lib | |
parent | 555eba5957ff9c26f296c932e5802e59b2179a1b (diff) | |
download | chef-e0408de463ab9b2138d11f39fadf0034fe7eb830.tar.gz |
add bootstrap_project for install cinc
Signed-off-by: sawanoboly <sawanoboriyu@higanworks.com>
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Signed-off-by: sawanoboly <sawanoboriyu@higanworks.com>
resolv indent
Signed-off-by: sawanoboly <sawanoboriyu@higanworks.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 6 | ||||
-rw-r--r-- | lib/chef/knife/bootstrap/templates/chef-full.erb | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index d4e98e3dec..89192cd76f 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -296,6 +296,12 @@ class Chef description: "URL to a custom installation script.", proc: Proc.new { |u| Chef::Config[:knife][:bootstrap_url] = u } + option :bootstrap_project, + long: "--bootstrap-project PROJECT", + description: "Project to install.", + proc: Proc.new { |u| Chef::Config[:knife][:bootstrap_project] = u }, + 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..66516b128a 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 <%= knife_config[:bootstrap_project] %> -c <%= @config[:channel] %> -v <%= version_to_install %> fi <% end %> |