From: Silvio Rhatto Date: Thu, 22 Jun 2017 16:41:41 +0000 (-0300) Subject: Adds nodo-apt-auto-update exec X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=db71fbbb22ce596bd16a6aca45dc2d420bff69c0;p=puppet-nodo.git Adds nodo-apt-auto-update exec --- 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,