fix params

This commit is contained in:
Arne Teuke
2025-03-02 03:22:27 +01:00
parent 02243e34f5
commit 74b0684ae1

View File

@@ -1,45 +1,43 @@
## cd_alloy::params.pp ## cd_alloy::params.pp
# Module name: cd_alloy # Module name: cd_alloy
# Author: Arne Teuke (arne_teuke@confdroid.com) # Author: Arne Teuke (arne_teuke@confdroid.com)
# @param [string] reqpackages which packages to install # @param [string] reqpackages which packages to install
# @param [string] pkg_ensure 'latest' or 'present' # @param [string] pkg_ensure 'latest' or 'present'
# @param [string] ay_loki_url the url where alloy will send logs to. # @param [string] ay_loki_url the url where alloy will send logs to.
# @param [string] ay_loki_username the username to logon to loki # @param [string] ay_loki_username the username to logon to loki
# @param [string] ay_loki_userpass the password to logon to loki # @param [string] ay_loki_userpass the password to logon to loki
# @param [boolean] ay_manage_loki whether to manage log forwarding to loki # @param [boolean] ay_manage_loki whether to manage log forwarding to loki
# @param [boolean] ay_manage_prom whether to manage metric forwarding # @param [boolean] ay_manage_prom whether to manage metric forwarding
# @param [string] ay_prom_url the url where alloy will send metrics # @param [string] ay_prom_url the url where alloy will send metrics
# @param [array] ay_log_targets the logging targets
# @summary Class contains all parameters for the cd_alloy module. # @summary Class contains all parameters for the cd_alloy module.
############################################################################## ##############################################################################
class cd_alloy::params ( class cd_alloy::params (
$reqpackages = 'alloy', String $reqpackages = 'alloy',
$pkg_ensure = 'latest', String $pkg_ensure = 'latest',
# loki # loki
$ay_manage_loki = true, String $ay_manage_loki = true,
$ay_loki_url = 'https://loki.example.net/loki/api/v1/push', String $ay_loki_url = 'https://loki.example.net/loki/api/v1/push',
$ay_loki_username = '', String $ay_loki_username = 'loki_user',
$ay_loki_userpass = '', String $ay_loki_userpass = 'loki_pass',
$ay_log_targets = ['/var/log/messages','/var/log/secure',], Array $ay_log_targets = ['/var/log/messages','/var/log/secure',],
# prometheus # prometheus
$ay_manage_prom = true, Boolean $ay_manage_prom = true,
$ay_prom_url = 'https://prometheus.example.net/api/v1/write', String $ay_prom_url = 'https://prometheus.example.net/api/v1/write',
) { ) {
# service
$ay_service = 'alloy'
# service # dirs
$ay_service = 'alloy' $ay_main_dir = '/etc/alloy'
# dirs
$ay_main_dir = '/etc/alloy'
# files
$ay_main_file = "${ay_main_dir}/config.alloy"
# files
$ay_main_file = "${ay_main_dir}/config.alloy"
# includes must be last # includes must be last
include cd_alloy::main::config include cd_alloy::main::config
} }