Files
confdroid_automatic/manifests/params.pp

50 lines
2.1 KiB
ObjectPascal
Raw Normal View History

2026-03-29 15:54:10 +02:00
## confdroid_automatic::params.pp
# Module name: confdroid_automatic
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages all parameters for the confdroid_automatic module
# @param [String] ac_reqpackages which packages to install
# @param [String] ac_pkg_ensure which version of packages to install
2025-06-03 16:38:51 +02:00
# @param [String] ac_upgrade_type what upgrades to manage
2025-06-03 17:01:11 +02:00
# @param [String] ac_random_sleep random sleep seconds
# @param [String] ac_network_online_timeout Maximum time until be online
# @param [String] ac_download_updates whether to download available updates
# @param [String] ac_apply_updates whether to apply available updates
# @param [String] ac_reboot when to reboot after applied updates
# @param [String] ac_emit_via how to inform about emitted updates
2025-06-03 17:14:47 +02:00
# @param [String] ac_email_to where to send the email to
# @param [String] ac_email_host which host to use to send the email
2025-06-02 16:25:06 +02:00
##############################################################################
2026-03-29 15:54:10 +02:00
class confdroid_automatic::params (
2025-06-02 16:25:06 +02:00
2026-03-29 15:54:10 +02:00
String $ac_reqpackages = 'dnf-automatic',
String $ac_pkg_ensure = 'latest',
2025-06-03 16:38:51 +02:00
# updates
2025-06-03 17:01:11 +02:00
String $ac_upgrade_type = 'default',
String $ac_random_sleep = '0',
String $ac_network_online_timeout = '60',
String $ac_download_updates = 'yes',
String $ac_apply_updates = 'yes',
String $ac_reboot = 'never',
String $ac_emit_via = 'email',
2025-06-03 17:14:47 +02:00
String $ac_email_to = 'root@example.net',
String $ac_email_host = 'localhost',
2025-06-02 16:41:08 +02:00
2025-06-02 16:25:06 +02:00
) {
2025-06-02 17:03:06 +02:00
# Facts
2025-06-03 16:38:51 +02:00
$fqdn = $facts['networking']['fqdn']
$domain = $facts['networking']['domain']
$os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major']
2025-06-02 17:03:06 +02:00
# Service
2025-06-03 16:38:51 +02:00
$ac_service = 'dnf-automatic.timer'
2025-06-02 17:03:06 +02:00
2025-06-03 16:16:53 +02:00
# Files
2025-06-03 16:38:51 +02:00
$ac_main_config = '/etc/dnf/automatic.conf'
2026-03-29 15:54:10 +02:00
$ac_main_config_erb = 'confdroid_automatic/automatic.conf.erb'
2025-06-03 16:16:53 +02:00
2025-06-02 16:41:08 +02:00
# includes must be last
2026-03-29 15:54:10 +02:00
include confdroid_automatic::main::config
2025-06-02 16:25:06 +02:00
}