adds directory control for errors

This commit is contained in:
Arne Teuke
2018-12-30 17:50:39 +01:00
parent 6ecca6ef59
commit 5170181c50
10 changed files with 93 additions and 0 deletions

View File

@@ -38,5 +38,17 @@ class cd_haproxy::main::dirs (
seltype => etc_t,
seluser => system_u,
}
# errors dir
file { $hy_errors_dir:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
}
}
}

View File

@@ -58,5 +58,20 @@ class cd_haproxy::main::files (
seltype => haproxy_var_run_t,
seluser => system_u,
}
# error files
file { $hy_400_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($hy_400_erb),
notify => Service[$hy_service],
}
}
}

View File

@@ -123,10 +123,13 @@ $hy_service = 'haproxy'
# directories
$hy_main_dir = '/etc/haproxy'
$hy_errors_dir = "${hy_main_dir}/errors"
# files
$hy_main_config = "${hy_main_dir}/haproxy.cfg"
$hy_config_head_erb = 'cd_haproxy/haproxy_head.erb'
$hy_400_file = "${hy_errors_dir}/400.http"
$hy_400_erb = 'cd_haproxy/400_http.erb'
# includes must be last