For the benefit of others, I contacted the maintainer of the reidmv/unzip
module and this was his (very helpful) response :-
Hi Fraser,
The requirement that the file be local is just a constraint of how the unzip
module works right now. This is a very simple module. In practice, that means
that if your file is remote you either need to use something like
lwf/remote_file to first ensure that a local copy exists, or alternatively you
could use a larger more complicated module such as nanliu/archive, which
provides a larger more complex type that can directly retrieve and unzip remote
files.
Example using reidmv/unzip and lwf/remote_file together:
remote_file { 'jboss-native.zip':
ensure => present,
path => 'C:/jboss/jboss-native-2.0.10-windows-x64-ssl.zip',
source =>
'http://downloads.jboss.org/jbossnative/2.0.10.GA/jboss-native-2.0.10-windows-x64-ssl.zip',
require => File['C:/jboss/jboss-as-7.1.1.Final'],
} ->
unzip { 'jboss-native':
source => 'C:/jboss/jboss-native-2.0.10-windows-x64-ssl.zip',
destination => 'C:/jboss/jboss-as-7.1.1.Final',
creates => 'C:/jboss/jboss-as-7.1.1.Final/bin/jbosssvc.exe',
}
Example using nanliu/archive:
archive { 'jboss-native':
ensure => present,
extract => true,
extract_path => 'C:/jboss/jboss-as-7.1.1.Final',
source =>
'http://downloads.jboss.org/jbossnative/2.0.10.GA/jboss-native-2.0.10-windows-x64-ssl.zip',
creates => 'C:/jboss/jboss-as-7.1.1.Final/bin/jbosssvc.exe',
cleanup => true,
}
I don't typically use archive myself since it's a little bit more heavyweight
and when I used it last it required 7zip and some ruby gems installed to
operate correctly but I like to mention it in case it works for people.
unzip itself could likely be extended to be able to use remote sources if
someone were to upgrade the powershell snippet that is used to perform the
extraction. I don'tnticipate adding that anytime soon myself but pull requests
definitely welcome! :-)
Hope that helps,
~Reid
- Show quoted text -
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/50639b6c-9db2-4ba4-9174-5be41737cca2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.