From 53548307c848e31357ed9a18b993e93284665713 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Tue, 3 Jun 2025 17:14:47 +0200 Subject: [PATCH] config file --- manifests/params.pp | 4 ++++ templates/automatic.conf.erb | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index aaf1fcc..1574f4b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -11,6 +11,8 @@ # @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 +# @param [String] ac_email_to where to send the email to +# @param [String] ac_email_host which host to use to send the email ############################################################################## class automatic_cd::params ( @@ -25,6 +27,8 @@ class automatic_cd::params ( String $ac_apply_updates = 'yes', String $ac_reboot = 'never', String $ac_emit_via = 'email', + String $ac_email_to = 'root@example.net', + String $ac_email_host = 'localhost', ) { # Facts diff --git a/templates/automatic.conf.erb b/templates/automatic.conf.erb index d26a25f..3a530e6 100644 --- a/templates/automatic.conf.erb +++ b/templates/automatic.conf.erb @@ -56,10 +56,10 @@ emit_via = <%= @ac_emit_via %> email_from = root@<%= @fqdn %> # List of addresses to send messages to. -email_to = root +email_to = <%= @ac_email_to %> # Name of the host to connect to to send email messages. -email_host = localhost +email_host = <%= @ac_email_host %> [command] @@ -84,10 +84,10 @@ email_host = localhost # stdin_format = "{body}" # The address to send email messages from. -email_from = root@example.com +email_from = root@<%= @fqdn %> # List of addresses to send messages to. -email_to = root +email_to = <%= @ac_email_to %> [base]