added control for nagios_ssl vhost

This commit is contained in:
Arne Teuke
2017-07-23 11:54:58 +01:00
parent 98711530f9
commit d337cae1e5
4 changed files with 75 additions and 6 deletions

View File

@@ -381,6 +381,8 @@ $ng_unless_get_cert = 'cd_nagios/certbot/unless_get_cert.erb'
$ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
$ng_index_html_file = '/var/www/html/index.html'
$ng_index_html_erb = 'cd_nagios/httpd/index_html.erb'
$ng_ssl_vhost_file = '/etc/httpd/conf.d/nagios_ssl.conf'
$ng_ssl_vhost_erb = 'cd_nagios/httpd/nagios_ssl_vhost.erb'
# certbot
$ng_certbot_main_dir = '/etc/letsencrypt'

View File

@@ -85,12 +85,11 @@ class cd_nagios::server::files (
notify => Service[$ae_service],
}
if $ng_use_https == true {
if $ng_http_https_fw == true {
file { $ng_forward_conf:
file { $ng_ssl_vhost_file:
ensure => file,
path => $ng_forward_conf,
path => $ng_ssl_vhost_file,
owner => 'root',
group => 'root',
mode => '0644',
@@ -98,11 +97,27 @@ class cd_nagios::server::files (
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_forward_conf_erb),
content => template($ng_ssl_vhost_erb),
notify => Service[$ae_service],
}
}
if $ng_http_https_fw == true {
file { $ng_forward_conf:
ensure => file,
path => $ng_forward_conf,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_forward_conf_erb),
notify => Service[$ae_service],
}
}
}
if $ng_enable_index == true {