puppet-archive
puppet-archive copied to clipboard
feature request: extract without temporary file (using pipe)
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 6.11.1
- Ruby: 2.0.0p648 (OS) 2.5.7p206 (Puppet)
- Distribution: CentOS 7.7
- Module version: 4.4.0
How to reproduce (e.g Puppet code you use)
I have a real big file which I must unpack. So I wanted to save space using a pipe to unpack:
archive { 'test':
ensure => present,
path => '-',
url => "https://fqdn.local/test.tar.gz",
provider => 'wget',
download_options => '-q | bash -c "cd / && tar xf -"',
cleanup => false,
creates => '/path',
}
What are you seeing
Error: Failed to apply catalog: Parameter path failed on Archive[filename]: archive path must be absolute: - (file:...)
What behaviour did you expect instead
It should accept -
as path
. I am not sure if it would work together with the cleanup
- and creates
-settings. It should only download again if /path
does not exist.
Maybe one should not misuse download_options
but instead use a new parameter extract_pipe=true|false
.
Any additional information you'd like to impart
It is a problem like https://github.com/voxpupuli/puppet-archive#network-files but since it is https instead of nfs I would need this solution.