if node[:platform] == 'ubuntu'
remote_file '/tmp/test.txt' do
source 'https://server1.example.com/pub/test.txt'
owner 'root'
group 'root'
mode '0755'
action :create
end
end
I am getting this error.
" [2020-02-27T18:27:10+00:00] FATAL: OpenSSL::SSL::SSLError: remote_file[/tmp/test.txt] (installInfraServer::default line 108) had an error: OpenSSL::SSL::SSLError: SSL Error connecting to https://server1.example.com/pub/test.txt - SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate)"
You are receiving this error because you are connecting to your remote source using https (secure http) with a self-signed cert. You either need to get a CA signed cert or add your certificate to the cacert usually found at /opt/chef/embedded/ssl/certs/cacert.pem