add fw and dirs control - https://gitlab.confdroid.com/internal/confdroid_management/-/issues/260
This commit is contained in:
@@ -7,14 +7,27 @@
|
||||
# @param [String] pkg_ensure which version of the package to install
|
||||
# @param [boolean] manage_prometheus whether to manage prometheus
|
||||
# @param [boolean] manage_node_exporter whether to manage node exporter
|
||||
# @param [boolean] ps_manage_fw whether to manage the firewall
|
||||
# @param [String] ps_prom_host the fqdn of the prometheus server
|
||||
# @param [String] ps_fw_prefix the firewall rule prefix
|
||||
# @param [String] ps_main_port the firewall main port for prometheus
|
||||
##############################################################################
|
||||
class prometheus_cd::params (
|
||||
|
||||
# installation
|
||||
String $reqpackage_prom = 'prometheus2',
|
||||
String $reqpackage_ne = 'node_exporter',
|
||||
String $pkg_ensure = 'present',
|
||||
|
||||
# config logic
|
||||
Boolean $manage_prometheus = false,
|
||||
Boolean $manage_node_exporter = false,
|
||||
Boolean $ps_manage_fw = false,
|
||||
String $ps_prom_host = 'prometheus.example.net',
|
||||
|
||||
# firewall
|
||||
String $ps_fw_prefix = '50',
|
||||
String $ps_main_port = '9090',
|
||||
|
||||
) {
|
||||
# defaults
|
||||
@@ -23,6 +36,9 @@ class prometheus_cd::params (
|
||||
$os_name = $facts['os']['name']
|
||||
$os_release = $facts['os']['release']['major']
|
||||
|
||||
# dirs
|
||||
$ps_main_dir = '/etc/prometheus'
|
||||
|
||||
# includes must be last
|
||||
include prometheus_cd::main::config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user