Trying to set up puppet on fresh ubuntu 16.04 instances of AWS.
But constantly getting below issue.
root@ip-172-31-40-18:/etc/puppetlabs/puppet# /opt/puppetlabs/bin/puppet agent --test
Info: Caching certificate for puppet
Error: Could not request certificate: Server hostname "puppetmaster" did not match server certificate; expected one of ip-172-31-43-83.ec2.internal, DNS:puppet, DNS:ip-172-31-43-83.ec2.internal
Exiting; failed to retrieve certificate and waitforcert is disabled