feat: puppetboard on consul

- updated nginx param types
- add nginx aliases, merge with vhost, use as server_names
- add additional vault alt-names
- add prepared query for puppetboard
This commit is contained in:
2024-05-22 22:51:54 +10:00
parent 6bd66724dc
commit 349547c4bc
4 changed files with 44 additions and 3 deletions
@@ -18,8 +18,9 @@ class profiles::puppet::puppetboard (
String $gunicorn_bind_prefix = 'http://',
Integer $gunicorn_workers = 1,
Integer $gunicorn_threads = 4,
String $nginx_vhost = 'puppetboard.main.unkin.net',
Integer $nginx_port = 80,
Stdlib::Port $nginx_port = 80,
Stdlib::Host $nginx_vhost = 'puppetboard.main.unkin.net',
Array[Stdlib::Host] $nginx_aliases = [],
#String[1] $secret_key = "${fqdn_rand_string(32)}",
) {
@@ -98,10 +99,12 @@ class profiles::puppet::puppetboard (
# ensure the nginx service is managed
class { 'nginx': }
$nginx_server_names = unique([$nginx_vhost] + $nginx_aliases)
# create the nginx vhost
nginx::resource::server { $nginx_vhost:
listen_port => $nginx_port,
server_name => [$nginx_vhost],
server_name => $nginx_server_names,
proxy => "${gunicorn_bind_prefix}${gunicorn_bind}",
proxy_set_header => [
'Host $http_host',