3
0
Arne Teuke
2025-10-18 13:59:28 +02:00
parent 27694ecdcb
commit d69edd2891
2 changed files with 15 additions and 12 deletions

View File

@@ -6,16 +6,18 @@
class prometheus_cd::main::files (
) inherits prometheus_cd::params {
require prometheus_cd::main::dirs
file { $ps_main_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template('prometheus_cd/prometheus.yml.erb'),
notify => Service[$ps_prom_service],
if $ps_prom_host == fqdn {
file { $ps_main_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template('prometheus_cd/prometheus.yml.erb'),
notify => Service[$ps_prom_service],
}
}
}

View File

@@ -12,7 +12,7 @@
# @param [String] ps_fw_prefix the firewall rule prefix
# @param [String] ps_main_port the firewall main port for prometheus
# @param [String] ps_auth_user the username for authentication
# @param [String] ps_auth_user the password for authentication
# @param [String] ps_auth_pass the password for authentication
##############################################################################
class prometheus_cd::params (
@@ -51,6 +51,7 @@ class prometheus_cd::params (
# services
$ps_prom_service = 'prometheus'
$ps_ne_service = 'node_exporter'
# includes must be last
include prometheus_cd::main::config
}