aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/subsystem/apt.pp10
1 files changed, 7 insertions, 3 deletions
diff --git a/manifests/subsystem/apt.pp b/manifests/subsystem/apt.pp
index dffd42a..7489413 100644
--- a/manifests/subsystem/apt.pp
+++ b/manifests/subsystem/apt.pp
@@ -1,6 +1,8 @@
class nodo::subsystem::apt(
$ensure = present,
$auto_upgrade = present,
+ $hour = 2,
+ $minute = 0,
) {
file { '/etc/apt/sources.list':
ensure => $ensure ? {
@@ -13,15 +15,17 @@ class nodo::subsystem::apt(
content => template("nodo/apt/${::operatingsystem}.sources.list.erb"),
}
+ # We have /var/log/dpkg.log, so we do not need to rotate /var/log/upgrade.log
+ $log = ">> /var/log/upgrade.log 2>&1"
$apt = '/usr/bin/apt-get'
- $command = "${apt} update && ${apt} dist-upgrade -y && ${apt} autoremove -y && ${apt} clean"
+ $command = "${apt} update ${log} && ${apt} dist-upgrade -y ${log} && ${apt} autoremove -y ${log} && ${apt} clean ${log}"
cron { 'nodo-apt-auto-upgrade':
ensure => $auto_upgrade,
command => $command,
environment => 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
user => 'root',
- hour => 2,
- minute => 0,
+ hour => $hour,
+ minute => $minute,
}
}