saltstack/salt — Issue #253: Support for http/https/ftp/etc. for resources
Author: pcarrier
Created: 2011-11-23 20:01:25+00:00
State: open

For files (but not necessarily only files, an abstract mechanism would be awesome), it could be useful to use protocols other than salt:///.

HTTP resources, for example could offer various mechanisms to check if the file is required:

* If-Modified-Since request header
* HEAD request then check if a resource has changed:
* ETag

It could also be useful to have parameters like sha1 or md5 to provide the URI of a checksum.

For example:

# Check a checksum file
/foo/bar1:
file:
- managed
- source: sftp://central.repo/foo/bar1
- sha1:
- source: https://central/repo/foo/bar1.sha1

# Check a HTTP header
/foo/bar2:
file:
- managed
- source: sftp://central.repo/foo/bar2
- replace-if: If-Modified-Since

# Hardcoded checksum, doesn't change often but can change
/var/lib/huge.iso
file:
- managed
- source: ftp://central.repo/isos/huge.iso
- md5: a287b36d7dbc8a05e95e26afaa6be234