X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstaging%2Fmanifests%2Fdeploy.pp;fp=3rdparty%2Fmodules%2Fstaging%2Fmanifests%2Fdeploy.pp;h=565038701f1a104273ee46e3564f1af1a58b6db6;hp=0000000000000000000000000000000000000000;hb=269aa0e4ab1d106f521995e9e4beb8335acdbed6;hpb=d44d714d51cff79f225cae6a6d8f98f97d3000a5 diff --git a/3rdparty/modules/staging/manifests/deploy.pp b/3rdparty/modules/staging/manifests/deploy.pp new file mode 100644 index 00000000..56503870 --- /dev/null +++ b/3rdparty/modules/staging/manifests/deploy.pp @@ -0,0 +1,42 @@ +# The define resource extracts compressed file to a staging location. +define staging::deploy ( + $source, #: the source file location, supports local files, puppet://, http://, https://, ftp:// + $target, #: the target extraction directory + $staging_path = undef, #: the staging location for compressed file. defaults to ${staging::path}/${caller_module_name} + $username = undef, #: https or ftp username + $certificate = undef, #: https certifcate file + $password = undef, #: https or ftp user password or https certificate password + $environment = undef, #: environment variable for settings such as http_proxy + $timeout = undef, #: the time to wait for the file transfer to complete + $user = undef, #: extract file as this user + $group = undef, #: extract group as this group + $creates = undef, #: the file/folder created after extraction. if unspecified defaults to ${target}/${name} + $unless = undef, #: alternative way to conditionally extract file + $onlyif = undef #: alternative way to conditionally extract file +) { + + staging::file { $name: + source => $source, + target => $staging_path, + username => $username, + certificate => $certificate, + password => $password, + environment => $environment, + subdir => $caller_module_name, + timeout => $timeout, + } + + staging::extract { $name: + target => $target, + source => $staging_path, + user => $user, + group => $group, + environment => $environment, + subdir => $caller_module_name, + creates => $creates, + unless => $unless, + onlyif => $onlyif, + require => Staging::File[$name], + } + +}