Files
confdroid_automatic/manifests/params.pp

50 lines
2.0 KiB
ObjectPascal
Raw Normal View History

2025-06-02 16:25:06 +02:00
## automatic_cd::params.pp
# Module name: automatic_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages all parameters for the automatic_cd module
2025-06-02 16:41:08 +02:00
# @param [String] reqpackages which packages to install
# @param [String] 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
##############################################################################
2025-06-02 16:27:32 +02:00
class automatic_cd::params (
2025-06-02 16:25:06 +02:00
2025-06-03 17:01:11 +02:00
String $reqpackages = 'dnf-automatic',
String $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'
$ac_main_config_erb = 'automatic_cd/automatic.conf.erb'
2025-06-03 16:16:53 +02:00
2025-06-02 16:41:08 +02:00
# includes must be last
include automatic_cd::main::config
2025-06-02 16:25:06 +02:00
}