1 # The define resource extracts compressed file to a staging location.
2 define staging::deploy (
3 $source, #: the source file location, supports local files, puppet://, http://, https://, ftp://
4 $target, #: the target extraction directory
5 $staging_path = undef, #: the staging location for compressed file. defaults to ${staging::path}/${caller_module_name}
6 $username = undef, #: https or ftp username
7 $certificate = undef, #: https certifcate file
8 $password = undef, #: https or ftp user password or https certificate password
9 $environment = undef, #: environment variable for settings such as http_proxy
10 $timeout = undef, #: the time to wait for the file transfer to complete
11 $user = undef, #: extract file as this user
12 $group = undef, #: extract group as this group
13 $creates = undef, #: the file/folder created after extraction. if unspecified defaults to ${target}/${name}
14 $unless = undef, #: alternative way to conditionally extract file
15 $onlyif = undef #: alternative way to conditionally extract file
18 staging::file { $name:
20 target => $staging_path,
21 username => $username,
22 certificate => $certificate,
23 password => $password,
24 environment => $environment,
25 subdir => $caller_module_name,
29 staging::extract { $name:
31 source => $staging_path,
34 environment => $environment,
35 subdir => $caller_module_name,
39 require => Staging::File[$name],