From d69edd2891d6eeeb370864d6a756b63a262e59f0 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Sat, 18 Oct 2025 13:59:28 +0200 Subject: [PATCH 1/2] 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 } From 838685c7bf4db533a21ac12140075dfb971d21a8 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Sat, 18 Oct 2025 14:00:43 +0200 Subject: [PATCH 2/2] Recommit for updates in build 19 --- .../prometheus_cd_3A_3Amain_3A_3Afiles.html | 28 +++++++++++-------- .../prometheus_cd_3A_3Aparams.html | 19 +++---------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html index 4128703..d154ff8 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Amain_3A_3Afiles.html @@ -116,7 +116,9 @@ 18 19 20 -21 +21 +22 +23
# File 'manifests/main/files.pp', line 6
@@ -124,17 +126,19 @@
 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/doc/puppet_classes/prometheus_cd_3A_3Aparams.html b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html index 16cbe11..651cb71 100644 --- a/doc/puppet_classes/prometheus_cd_3A_3Aparams.html +++ b/doc/puppet_classes/prometheus_cd_3A_3Aparams.html @@ -292,7 +292,7 @@
  • - ps_auth_user + ps_auth_pass (String) @@ -308,19 +308,6 @@
  • -
  • - - ps_auth_pass - - - (String) - - - (defaults to: 'changeme') - - -
  • - @@ -371,7 +358,8 @@ 53 54 55 -56 +56 +57
    # File 'manifests/params.pp', line 17
    @@ -413,6 +401,7 @@ class prometheus_cd::params (
       # services
       $ps_prom_service        = 'prometheus'
       $ps_ne_service          = 'node_exporter'
    +
       # includes must be last
       include prometheus_cd::main::config
     }