Files
confdroid_alloy/manifests/params.pp

54 lines
1.9 KiB
ObjectPascal
Raw Normal View History

2025-03-02 13:49:35 +01:00
## alloy_cd::params.pp
# Module name: alloy_cd
2025-02-23 14:34:15 +01:00
# Author: Arne Teuke (arne_teuke@confdroid.com)
2025-03-02 03:22:27 +01:00
# @param [string] reqpackages which packages to install
# @param [string] pkg_ensure 'latest' or 'present'
2025-02-24 13:36:57 +01:00
# @param [string] ay_loki_url the url where alloy will send logs to.
2025-02-24 13:24:45 +01:00
# @param [string] ay_loki_username the username to logon to loki
# @param [string] ay_loki_userpass the password to logon to loki
2025-02-24 15:23:20 +01:00
# @param [boolean] ay_manage_loki whether to manage log forwarding to loki
# @param [boolean] ay_manage_prom whether to manage metric forwarding
# @param [string] ay_prom_url the url where alloy will send metrics
2025-03-02 03:22:27 +01:00
# @param [array] ay_log_targets the logging targets
2025-03-10 15:13:46 +01:00
# @param [boolean] ay_manage_user whether to manage user settings
# @param [string] ay_user the alloy user name
# @param [array] ay_groups which groups the user should be in
# @param [string] ay_user_shell which shell to use
2025-03-02 13:49:35 +01:00
# @summary Class contains all parameters for the alloy_cd module.
2025-02-23 14:34:15 +01:00
##############################################################################
2025-03-02 13:49:35 +01:00
class alloy_cd::params (
2025-02-23 14:34:15 +01:00
2025-03-02 03:22:27 +01:00
String $reqpackages = 'alloy',
String $pkg_ensure = 'latest',
2025-02-24 13:24:45 +01:00
# loki
2025-03-02 15:17:39 +01:00
Boolean $ay_manage_loki = true,
2025-03-02 03:22:27 +01:00
String $ay_loki_url = 'https://loki.example.net/loki/api/v1/push',
String $ay_loki_username = 'loki_user',
String $ay_loki_userpass = 'loki_pass',
Array $ay_log_targets = ['/var/log/messages','/var/log/secure',],
2025-02-24 15:23:20 +01:00
# prometheus
2025-03-02 03:22:27 +01:00
Boolean $ay_manage_prom = true,
String $ay_prom_url = 'https://prometheus.example.net/api/v1/write',
2025-02-23 17:25:46 +01:00
2025-03-10 15:13:46 +01:00
# user
Boolean $ay_manage_user = true,
String $ay_user = 'alloy',
2025-03-10 15:51:36 +01:00
Array $ay_groups = ['systemd-journal','adm'],
2025-03-10 15:13:46 +01:00
String $ay_user_shell = '/sbin/nologin',
2025-02-23 14:34:15 +01:00
) {
2025-03-02 03:22:27 +01:00
# service
$ay_service = 'alloy'
2025-02-23 14:34:15 +01:00
2025-03-02 03:22:27 +01:00
# dirs
$ay_main_dir = '/etc/alloy'
2025-02-24 12:02:24 +01:00
2025-03-02 03:22:27 +01:00
# files
$ay_main_file = "${ay_main_dir}/config.alloy"
2025-02-24 12:02:24 +01:00
2025-02-23 17:02:27 +01:00
# includes must be last
2025-03-02 13:49:35 +01:00
include alloy_cd::main::config
2025-02-23 14:34:15 +01:00
}