From 1a7079fb117b23fff4052d99f41de4fa3c6f1e30 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 16 Feb 2024 15:27:28 +0200 Subject: [PATCH] Fix comments and timer --- manifests/init.pp | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index f52fcef..7307995 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -61,10 +61,14 @@ # String with nodejs version to install. Default 16.x # # [*manage_updater_task*] -# Boolean indicating if this class should manage a scheduled task (Systemd Timer unit) to update Mastodon automatically. Requires a github token with read access to public repos. +# Boolean indicating if this class should manage a scheduled +# task (Systemd Timer unit) to update Mastodon automatically. +# Requires a github token with read access to public repos. # # [*github_token*] # String with the Github token with read access to public repos. +# WARNING! This token will be in plain text in the System unit +# definition, so restrict it to only read public repos. # class mastodon ( String $ensure = 'present', @@ -556,19 +560,20 @@ class mastodon ( enable => true, } - $_timer_updater = @("EOT") - [Unit] - Description=Mastodon - Updater - - [Timer] - OnBootSec=24min - OnUnitActiveSec=1d - Unit=mastodon_updater.service - - [Install] - WantedBy=timers.target - | EOT if ($manage_updater_task and $github_token != '') { + $_timer_updater = @("EOT") + [Unit] + Description=Mastodon - Updater + + [Timer] + OnBootSec=24min + OnUnitActiveSec=1d + Unit=mastodon_updater.service + + [Install] + WantedBy=timers.target + | EOT + $_service_updater = @("EOT") [Service] Type=simple