From 6ec5a049ad1a30c305d7e99855ed125e8764357f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Str=C3=B6mb=C3=A4ck?= <filip.stromback@liu.se> Date: Fri, 10 Jan 2020 09:33:09 +0100 Subject: [PATCH] Added "anacrontab" to make sure things are not restarted during exam hours. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filip Strömbäck <filip.stromback@liu.se> --- files/anacrontab | 16 ++++++++++++++++ manifests/init.pp | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 files/anacrontab diff --git a/files/anacrontab b/files/anacrontab new file mode 100644 index 0000000..7a05789 --- /dev/null +++ b/files/anacrontab @@ -0,0 +1,16 @@ +# /etc/anacrontab: configuration file for anacron + +# See anacron(8) and anacrontab(5) for details. + +SHELL=/bin/sh +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +# the maximal random delay added to the base delay of the jobs +RANDOM_DELAY=45 +# the jobs will be started during the following hours only +START_HOURS_RANGE=0-4 + +#period in days delay in minutes job-identifier command +1 5 cron.daily nice run-parts /etc/cron.daily +7 25 cron.weekly nice run-parts /etc/cron.weekly +@monthly 45 cron.monthly nice run-parts /etc/cron.monthly diff --git a/manifests/init.pp b/manifests/init.pp index 78316cf..b3b0b77 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -21,6 +21,14 @@ class aes { content => file("${module_name}/sudoers_aes"), } + file { '/etc/anacrontab': + ensure => file, + mode => '0600', + owner => root, + group => root, + content => file("${module_name}/anacrontab"), + } + ::users::liu_user { 'klaar36': commonname => 'Klas Arvidsson', shell => '/bin/bash', -- GitLab