exec { "apt-get-update":
refreshonly => true,
command => "/usr/bin/apt-get update",
}
# automatic update before executing some apt-get stuff
Package {
provider => "apt",
require => Exec["apt-get-update"],
}