changed logig for http vs https and removed index+ welcome file control
This commit is contained in:
@@ -53,11 +53,25 @@ class cd_nagios::server::files (
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
|
||||
# manage nagios.conf for httpd
|
||||
# # manage nagios.conf for httpd
|
||||
|
||||
file { $ng_nagios_conf:
|
||||
# file { $ng_nagios_conf:
|
||||
# ensure => file,
|
||||
# path => $ng_nagios_conf,
|
||||
# owner => 'root',
|
||||
# group => 'root',
|
||||
# mode => '0644',
|
||||
# selrange => s0,
|
||||
# selrole => object_r,
|
||||
# seltype => httpd_config_t,
|
||||
# seluser => system_u,
|
||||
# content => template($ng_nagios_conf_erb),
|
||||
# notify => Service[$ae_service],
|
||||
# }
|
||||
|
||||
file { $ng_forward_conf:
|
||||
ensure => file,
|
||||
path => $ng_nagios_conf,
|
||||
path => $ng_forward_conf,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
@@ -65,28 +79,14 @@ class cd_nagios::server::files (
|
||||
selrole => object_r,
|
||||
seltype => httpd_config_t,
|
||||
seluser => system_u,
|
||||
content => template($ng_nagios_conf_erb),
|
||||
notify => Service[$ae_service],
|
||||
}
|
||||
|
||||
# manage welcome.conf for nagios web server
|
||||
|
||||
file { $ng_welcome_conf:
|
||||
ensure => file,
|
||||
path => $ng_welcome_conf,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => httpd_config_t,
|
||||
seluser => system_u,
|
||||
content => template($ng_welcome_conf_erb),
|
||||
content => template($ng_forward_conf_erb),
|
||||
notify => Service[$ae_service],
|
||||
}
|
||||
|
||||
if $ng_use_https == true {
|
||||
|
||||
# create ssl vhost
|
||||
|
||||
file { $ng_ssl_vhost_file:
|
||||
ensure => file,
|
||||
path => $ng_ssl_vhost_file,
|
||||
@@ -100,39 +100,14 @@ class cd_nagios::server::files (
|
||||
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 {
|
||||
if $ng_use_https != true {
|
||||
|
||||
file { $ng_index_html_file:
|
||||
ensure => file,
|
||||
path => $ng_index_html_file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => httpd_sys_content_t,
|
||||
seluser => system_u,
|
||||
content => template($ng_index_html_erb),
|
||||
notify => Service[$ae_service],
|
||||
# remove ssl_vhost
|
||||
|
||||
file { $ng_ssl_vhost_file:
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user