Puppet Tips&Tricks: Running apt-get update only when needed

How to only run apt-get update from puppet if it’s necessary. A small example on how you can make apt-get update only run if a) the machine rebooted and b) something changed in /etc/apt.
More...