aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-06-22 13:41:41 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-06-22 13:41:41 -0300
commitdb71fbbb22ce596bd16a6aca45dc2d420bff69c0 (patch)
treeae3c5a3937892dc607d2b11d21c09fdf39744375
parentcfd2acb18095887dd6f2034ebec7d3dabb1721b4 (diff)
downloadpuppet-nodo-db71fbbb22ce596bd16a6aca45dc2d420bff69c0.tar.gz
puppet-nodo-db71fbbb22ce596bd16a6aca45dc2d420bff69c0.tar.bz2
Adds nodo-apt-auto-update exec
-rw-r--r--manifests/subsystem/apt.pp7
1 files changed, 7 insertions, 0 deletions
diff --git a/manifests/subsystem/apt.pp b/manifests/subsystem/apt.pp
index 85152d0..55f7569 100644
--- a/manifests/subsystem/apt.pp
+++ b/manifests/subsystem/apt.pp
@@ -9,6 +9,7 @@ class nodo::subsystem::apt(
owner => root,
group => root,
mode => '0644',
+ notify => Exec['apt-auto-update'],
content => $ensure ? {
'present' => template("nodo/apt/${::operatingsystem}.sources.list.erb"),
default => undef,
@@ -20,6 +21,12 @@ class nodo::subsystem::apt(
$apt = '/usr/bin/apt-get'
$command = "${apt} update ${log} && ${apt} dist-upgrade -y ${log} && ${apt} autoremove -y ${log} && ${apt} clean ${log}"
+ exec { 'nodo-apt-auto-update':
+ command => "${apt} update ${log}",
+ user => "root",
+ refreshonly => true,
+ }
+
cron { 'nodo-apt-auto-upgrade':
ensure => $auto_upgrade,
command => $command,