In trying to spin up on puppet in a Vagrant environment, one of the things I have to do to my VM is 'apt-get update' at least once to catch the base box's understanding of what packages are where up to current. That takes a long enough time that I'd like to do it just once, or very rarely rather than every time I run 'vagrant provision'
Right now, my toplevel manifest does the update once before trying to install anything.
exec { "run apt-get update":
command => 'apt-get update',
# install and configure nginx
Ansible has a nice feature where you can specify how long you want the cache valid for, and it skips doing everything if the cache isn't that old (yet)
- name: update apt cache
apt: update_cache=yes cache_valid_time=84600
Is there something similar for Puppet, or can somebody suggest a reasonable workaround ?