feat: add selinux support to puppetboard

- required to allow nginx to reach puppetdb
This commit is contained in:
2023-12-11 22:14:45 +11:00
parent 7f270675b1
commit bf729d9b11
2 changed files with 33 additions and 0 deletions
@@ -20,6 +20,7 @@ class profiles::puppet::puppetboard (
Integer $gunicorn_threads = 4,
String $nginx_vhost = 'puppetboard.main.unkin.net',
Integer $nginx_port = 80,
Boolean $selinux = true,
#String[1] $secret_key = "${fqdn_rand_string(32)}",
) {
@@ -120,4 +121,14 @@ class profiles::puppet::puppetboard (
server => $nginx_vhost,
location_alias => "${virtualenv_dir}/lib/python${python_version}/site-packages/puppetboard/static",
}
# if selinux is defined, manage it
if $selinux {
# call the nginx selinux class
class { 'profiles::selinux::nginx':
require => Class['Nginx'],
}
}
}