3
0
This commit is contained in:
Arne Teuke
2025-10-18 15:29:20 +02:00
parent 1dec72f087
commit 173fc542f8
5 changed files with 38 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ class prometheus_cd::main::dirs (
) inherits prometheus_cd::params {
require prometheus_cd::main::install
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
# prometheus directors
# prometheus directory
file { $ps_main_dir:
ensure => directory,
owner => 'root',
@@ -18,5 +18,16 @@ class prometheus_cd::main::dirs (
seltype => etc_t,
seluser => system_u,
}
# service systemfile directory
file { $ps_system_file_dir:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => systemd_unit_file_t,
seluser => unconfined_u,
}
}
}

View File

@@ -5,8 +5,8 @@
##############################################################################
class prometheus_cd::main::files (
) inherits prometheus_cd::params {
require prometheus_cd::main::dirs
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
require prometheus_cd::main::dirs
file { $ps_main_file:
ensure => file,
owner => 'root',
@@ -19,5 +19,17 @@ class prometheus_cd::main::files (
content => template('prometheus_cd/prometheus.yml.erb'),
notify => Service[$ps_prom_service],
}
file { $ps_system_service_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => systemd_unit_file_t,
seluser => unconfined_u,
content => template('prometheus_cd/override.conf.erb'),
notify => Service[$ps_prom_service],
}
}
}