feat: manage puppet/puppetca consul services

- add puppet service
- add puppetca service
- add ability to write to puppet/puppetca service in consul
- add puppet.(query,service).consul to dns_alt_names of all masters
- add puppetca.(query,service).consul to dns_alt_names of puppetca
This commit is contained in:
2024-05-03 22:16:20 +10:00
parent df8a55c3dd
commit fe296d52d9
4 changed files with 57 additions and 8 deletions
@@ -32,4 +32,25 @@ class profiles::puppet::puppetca (
require => Service['puppetserver'],
}
}
# register the PuppetCA service with consul
if $is_puppetca {
consul::service { 'puppetca':
service_name => 'puppetca',
tags => ['ca', 'puppet', 'ssl'],
address => $facts['networking']['ip'],
port => 8140,
checks => [
{
id => 'puppetca_https_check',
name => 'PuppetCA HTTPS Check',
http => "https://${facts['networking']['fqdn']}:8140/status/v1/simple",
method => 'GET',
tls_skip_verify => true,
interval => '10s',
timeout => '1s',
}
],
}
}
}