From db71fbbb22ce596bd16a6aca45dc2d420bff69c0 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 22 Jun 2017 13:41:41 -0300 Subject: Adds nodo-apt-auto-update exec --- manifests/subsystem/apt.pp | 7 +++++++ 1 file changed, 7 insertions(+) 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, -- cgit v1.2.3