OP#470 add dir

This commit is contained in:
2026-02-27 15:18:08 +01:00
parent f1cb23c414
commit ec52f8f388
9 changed files with 35 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
# confdroid_prometheus::main::config.pp
# Module name: confdroid_prometheus
# Author: Arne Teuke (arne_teuke@confdroid.com)
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages the module logic for the confdroid_prometheus module.
##############################################################################
class confdroid_prometheus::main::config (

View File

@@ -1,6 +1,6 @@
# confdroid_prometheus::main::dirs.pp
# Module name: confdroid_prometheus
# Author: Arne Teuke (arne_teuke@confdroid.com)
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages directories for the confdroid_prometheus module.
##############################################################################
class confdroid_prometheus::main::dirs (
@@ -43,7 +43,20 @@ class confdroid_prometheus::main::dirs (
}
if $ps_enable_pruning == false {
file { $ps_pruning_dir:
ensure => absent,
ensure => absent,
}
}
# binary install directory
if $install_from_binary == true {
file { $ps_install_dir:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => usr_,
seluser => unconfined_u,
}
}
}

View File

@@ -1,6 +1,6 @@
# confdroid_prometheus::main::files.pp
# Module name: confdroid_prometheus
# Author: Arne Teuke (arne_teuke@confdroid.com)
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages configuration files for the confdroid_prometheus module.
##############################################################################
class confdroid_prometheus::main::files (

View File

@@ -1,16 +1,22 @@
# confdroid_prometheus::main::install.pp
# Module name: confdroid_prometheus
# Author: Arne Teuke (arne_teuke@confdroid.com)
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class install binaries for the confdroid_prometheus module.
##############################################################################
class confdroid_prometheus::main::install (
) inherits confdroid_prometheus::params {
require confdroid_prometheus::main::yumrepo
if $manage_prometheus == true {
package { $reqpackage_prom:
ensure => $pkg_ensure,
if $install_from_binary == false {
package { $reqpackage_prom:
ensure => $pkg_ensure,
}
}
if $install_from_binary == true {
# place function here to install from binary releases, e.g. using the archive module
}
}
if $manage_node_exporter == true {
package { $reqpackage_ne:
ensure => $pkg_ensure,

View File

@@ -1,6 +1,6 @@
# confdroid_prometheus::main::service.pp
# Module name: confdroid_prometheus
# Author: Arne Teuke (arne_teuke@confdroid.com)
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages the services for the confdroid_prometheus module.
##############################################################################
class confdroid_prometheus::main::service (

View File

@@ -1,6 +1,6 @@
# confdroid_prometheus::main::yumrepo.pp
# Module name: confdroid_prometheus
# Author: Arne Teuke (arne_teuke@confdroid.com)
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages yumrepo for the confdroid_prometheus module.
##############################################################################
class confdroid_prometheus::main::yumrepo (