Is there a good way to set up caching for Puppet, specifically templates? I have a number of modules that would be really, really useful to have available in a DR situation.
Proposed Solution
I know there isn't an inbuilt way to set up caching directly, based on the template documentation. Natively templates are rendered server side and there isn't a direct way to change this.
I was thinking about using a custom mount point to pull down specific modules I flag for offline use. This would be pointed back to the same directory puppet master reads from, to avoid things getting out of sync. I actually already have the basics for this working.
Once I have a local copy some kind of logic could perform a puppet run using the local mirror.
This would be a pseudo masterless puppet, something like
puppet apply --modulepath ./modules manifests/site.pp
How can I have effectively have puppet say puppet master isn't available, so execute these commands?