class ChefConfig::WorkstationConfigLoader
def apply_defaults
-
(void)
-
Other tags:
- Since: - 14.3
Other tags:
- Api: - private
def apply_defaults # If we don't have a better guess use the username. Config[:node_name] ||= Etc.getlogin # If we don't have a key (path or inline) check user.pem and $node_name.pem. unless Config.key?(:client_key) || Config.key?(:client_key_contents) key_path = find_default_key(["#{Config[:node_name]}.pem", "user.pem"]) Config[:client_key] = key_path if key_path end # Similarly look for a validation key file, though this should be less # common these days. unless Config.key?(:validation_key) || Config.key?(:validation_key_contents) key_path = find_default_key(["#{Config[:validation_client_name]}.pem", "validator.pem", "validation.pem"]) Config[:validation_key] = key_path if key_path end end