You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are setting the hostname as part of your chef converge (such as with the hostname cookbook), the certificate_manage resource does not create the expected filenames.
So if you use this:
certificate_manage "wildcard"
and your node['fqdn'] was updated during your chef run, then you end up with a file like:
/etc/pki/tls/certs/localhost.pem
(substitute localhost for whatever your original hostname was)
Instead, you have to ensure the values from the execution phase are used:
certificate_manage "wildcard" do
cert_file lazy { "#{node['fqdn']}.pem" }
key_file lazy { "#{node['fqdn']}.key" }
chain_file lazy { "#{node['fqdn']}-bundle.crt" }
end
Then you end up with a filename like:
/etc/pki/tls/certs/mynode.mycompany.com.pem
I thought it might be helpful if we add a note to the readme in case anybody else gets hung up on this.
If you are setting the hostname as part of your chef converge (such as with the hostname cookbook), the certificate_manage resource does not create the expected filenames.
So if you use this:
and your node['fqdn'] was updated during your chef run, then you end up with a file like:
(substitute localhost for whatever your original hostname was)
Instead, you have to ensure the values from the execution phase are used:
Then you end up with a filename like:
I thought it might be helpful if we add a note to the readme in case anybody else gets hung up on this.
Full repro is available here.
The text was updated successfully, but these errors were encountered: