From d69edd2891d6eeeb370864d6a756b63a262e59f0 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Sat, 18 Oct 2025 13:59:28 +0200 Subject: [PATCH] fix notification - https://gitlab.confdroid.com/internal/confdroid_management/-/issues/260 --- manifests/main/files.pp | 24 +++++++++++++----------- manifests/params.pp | 3 ++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/manifests/main/files.pp b/manifests/main/files.pp index 4a040e8..cdb7623 100644 --- a/manifests/main/files.pp +++ b/manifests/main/files.pp @@ -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], + } } } diff --git a/manifests/params.pp b/manifests/params.pp index 7c02743..c6f0a22 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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 }