Defined Type: aem::package
- Defined in:
- manifests/package.pp
Overview
Define: aem::package
Used to unpack the AEM instance prior to configuration.
Do not use this defines directly.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'manifests/package.pp', line 7
define aem::package (
$ensure,
$group,
$home,
$manage_home,
$source,
$user,
) {
File {
group => $group,
owner => $user,
}
Exec {
group => $group,
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
user => $user,
}
if $ensure == 'present' {
# Manage home directory.
if !defined(File[$home]) and $manage_home {
file { $home:
ensure => directory,
mode => '0775',
}
}
if defined(File[$home]) {
File[$home]
-> Exec["${name} unpack"]
}
# Unpack the Jar
exec { "${name} unpack":
command => "java -jar ${source} -b ${home} -unpack",
creates => "${home}/crx-quickstart",
onlyif => ['which java', "test -f ${source}"],
}
} else {
# Remove installation
file { "${home}/crx-quickstart": ensure => absent, force => true }
# Remove managed home directory
if !defined(File[$home]) and $manage_home {
file { $home:
ensure => absent,
force => true,
}
}
if defined(File[$home]) {
File["${home}/crx-quickstart"]
-> File[$home]
}
}
}
|