Search code examples
linuxsslchef-infra

Chef : knife.rb ignores ssl_verify_mode :verify_none when bootstrapping a node


I am trying to bootstrap a node from chef workstation. I have everything configured, and also the knife client list returns the name of the validator. However, when I bootstrap a node, I get the following error

ERROR: SSL Validation failure connecting to host: XXX.XXX.XXX - hostname XXX.XXX.XXX does not match the server certificate

Although I have configured the knife.rb and added the line

ssl_verify_mode :verify_none.

The chef server and workstation don't have domain names; only IPs.

Is there a way to work around the SSL check?


Solution

  • I'm unsure the knife.rb parameter is used for bootstrapping.

    There's a --node-ssl-verify-mode NONE for the knife bootstrap command, which will set the ssl_verify_mode parameter to :verify_none on the node bootstrapped.

    But really, configure a DNS system; you'll have another load of problems using IP as nginx won't be able to properly route the requests without a hostname defined.