voxpupuli / puppet-staging

⛔️ Deprecated in favor of puppet-archive
https://forge.puppet.com/puppet/archive
Apache License 2.0
51 stars 109 forks source link

Only get the file if a test passes, using unless #29

Closed dazole closed 10 years ago

dazole commented 10 years ago

i.e. unless => "test -d /extract/directory/possibly"

or

unless => "test -f /some/path/to/a/file.txt"

Keeping a large file on a server takes up space :)

cbarbour commented 10 years ago

Is there any case where we would want to retrieve the file and not extract it? I feel that simply passing the staging::deploy::unless parameter to staging::file::unless would be the correct approach. This would keep the staging::deploy and staging::file class more consistent with exec resources, and thus less surprising to use.

Additionally, staging::file should probably support the onlyif, unless, creates, refreshonly parameters as well.

cbarbour commented 10 years ago

We could maintain compatibility with existing versions by adding those parameters to staging::file, but not automatically passing them from the staging deploy class.

nanliu commented 10 years ago

I'm not planning to add any functionality to this module. See puppet-archive which should be able to do this: https://github.com/nanliu/puppet-archive.