puppetlabs/puppetlabs-razor — pull request #117 by calavera (2013-03-21 18:00:13+00:00)
Title: Cache downloaded images.

This is a small improvement over the url/source code that's in place now.

It adds two new properties to `tz_image`:

1. **cache**: It allows to specify a shared directory where all the images are downloaded. I manage several issues with Razor and I've found this easier to understand than the url/source behaviour.

2. **md5sum**: This property helps to verify that the image that you have in disk is actually what you expect. It's also a better check than just see if the file is there.

My manifests look like this with this patch:

```puppet
rz_image { 'image1.iso':
ensure => present,
source => 'http://remote-storage.com/image1.iso',
cache => '/var/cache/razor',
md5sum => 'image2-md5sum'
}

rz_image { 'image2.iso':
ensure => present,
source => 'http://remote-storage.com/image2.iso',
cache => '/var/cache/razor',
md5sum => 'image2-md5sum'
}
```

It would be great if you could merge these changes. Please, let me know if you want me to add any modification.