]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adds nodo-apt-auto-update exec
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 22 Jun 2017 16:41:41 +0000 (13:41 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 22 Jun 2017 16:41:41 +0000 (13:41 -0300)
manifests/subsystem/apt.pp

index 85152d0a30ba9afa41301de82bf7e9fb81cece20..55f75694842bc0d36d2d2ae152a9a76308a8a7f8 100644 (file)
@@ -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,