I created an A record for my puppetmaster. In case the puppetmaster on this ip address goes down and I have to spawn a new one from a new ip address, I can just change the ip address associated with the hostname in the A record to that of the new box.
I would like all my puppetclients to be able to connect to the new puppetmaster only by its hostname in the A record.
$ dig puppetmaster.mywebsite.com ;; ANSWER SECTION: puppetmaster.mywebsite.com. 300 IN A 126.96.36.199
My client has the hostname
puppetclient-01 and my master has the hostname
On my puppet client I have no entries that resolve the hostname of
puppetmaster to a particular IP in
/etc/hosts because if
puppetmaster goes down and I have to launch a new puppet master from a new ip, I want to avoid changing all the
/etc/hosts files in my clients.
puppetclient-01 the only change I made to the defaults are adding this
[agent] server = puppetmaster.mywebsite.com
puppetclient-01 I run this
root@puppetclient-01:~# puppet agent --test info: Creating a new SSL key for puppetclient-01 info: Caching certificate for ca info: Creating a new SSL certificate request for puppetclient-01 info: Certificate Request fingerprint (md5): 12:34:56:78:CB:81:62:2E:5F:AB:40:54:D0:A1:37:95 Exiting; no certificate found and waitforcert is disabled
puppetmaster I run this
oot@puppetmaster:~# puppetca --sign puppetclient-01 notice: Signed certificate request for puppetclient-01 notice: Removing file Puppet::SSL::CertificateRequest puppetclient-01 at '/var/lib/puppet/ssl/ca/requests/puppetclient-01.pem'
puppetclient-01 when I attempt a puppet run
root@puppetclient-01:~# puppet agent --test info: Caching certificate for puppetclient-01 err: Could not retrieve catalog from remote server: Server hostname 'puppetmaster.mywebsite.com' did not match server certificate; expected puppetmaster warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run err: Could not send report: Server hostname 'puppetmaster.mywebsite.com' did not match server certificate; expected puppetmaster
Why do I receive the error
Server hostname 'puppetmaster.mywebsite.com' did not match server certificate; expected puppetmaster?
Are there any directives I need to change in
etc/puppet/puppet.conf on either the client or master to get this to work correctly?