Closed natemccurdy closed 6 years ago
One possible way is to search /etc/puppetlabs/puppetserver/bootstrap.cfg
for the certificate-authority-service
line as that should only exist on the CA.
We also have this issue as we have HA enabled.
@jacobmw If you have a moment, can you check if the solution from the detect_master branch works for you?
The current logic to detect if the task is being run on a the primary master doesn't account for some edge cases. For example, when using SRV records and the value for
server
does not equalcertname
.https://github.com/natemccurdy/puppet-purge_node/blob/1.2.0/tasks/init.rb#L14
Find a better way to figure this out.