Puppet Class: staging
- Inherits:
- staging::params
- Defined in:
- manifests/init.pp
Overview
This module manages staging and extraction of files from various sources.
#### Actions:
Creates the root staging directory. By default files will be created in a subdirectory matching the caller_module_name.
/opt/staging/
|-- puppet
| `-- puppet.enterprise.2.0.tar.gz
`-- tomcat
`-- tomcat.5.0.tar.gz
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'manifests/init.pp', line 13
class staging (
$path = $staging::params::path, #: staging directory filepath
$owner = $staging::params::owner, #: staging directory owner
$group = $staging::params::group, #: staging directory group
$mode = $staging::params::mode, #: staging directory permission
$exec_path = $staging::params::exec_path #: executable default path
) inherits staging::params {
# Strip off any trailing '/'
$_path = regsubst($path,'/$','')
# Resolve conflict with pe_staging
if !defined(File[$_path]) {
file { $_path:
ensure => directory,
owner => $owner,
group => $group,
mode => $mode,
}
}
}
|