0
votes

I am using knife bootstrap command to bootstrap a node using chef 16.5.77 remotely. However, it is asking me to accept the license first even after I have sent --chef-license accept as parameter.

# /usr/bin/knife bootstrap --bootstrap-version 16.5.77 <machine name> --chef-license accept --ssh-user <user> -i <path-to-ssh-key> --environment <env> --config knife_config.rb --yes --sudo --bootstrap-install-command "rpm -e $(rpm -qa 'chef'); rpm -i <path-to-chef.rpm>"

I am still getting following response -

  Thank you for installing Chef Infra Client! For help getting started visit https://learn.chef.io
  Starting the first Chef Client run...
  +---------------------------------------------+
              Chef License Acceptance
 
  Before you can continue, 2 product licenses
  must be accepted. View the license at
  https://www.chef.io/end-user-license-agreement/
 
  Licenses that need accepting:
    * Chef Infra Client
    * Chef InSpec
 
  Do you accept the 2 product licenses (yes/no)?
1
I think the answer you are looking for is here. - seshadri_c
The link is directing to this page only @seshadri_c - ashishrana.cse
Sorry I posted the wrong link. This is the answer. - seshadri_c

1 Answers

0
votes

As per the chef docs -

The knife bootstrap command in Chef Client 14 cannot accept the Chef Infra Client 15 EULA on remote nodes unless you use a custom template and add chef_license "accept" to the client.rb. This applies to workstations who have Chef Infra Client <= 14.x, ChefDK <= 3.x or Chef Workstation <= 0.3 installed.

Hence, when I upgraded my chef-client on local machine to a higher version (>= 15.x), this worked.