1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'manifests/install.pp', line 1
class myst::install inherits myst {
# Setup environment variables / path
$myst_response_file="/tmp/myst-response.xml"
file { $myst_response_file:
ensure => present,
content => template("myst/myst-response.xml.erb"),
}
$myst_install_file="/tmp/myst.jar"
file { $myst_install_file:
ensure => present,
source => $myst_installer
}
Exec {
path => "/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:"
}
if $package_ensure == installed {
exec { "install-myst":
command => "java -jar ${myst_install_file} ${myst_response_file}",
require => [File[$myst_response_file],File[$myst_install_file]]
}
} elsif $package_ensure == absent {
exec { "uninstall-myst":
command => "java -jar ${myst_home}/Uninstaller/uninstaller.jar -c -f",
onlyif => "test -f ${myst_home}/Uninstaller/uninstaller.jar"
}
}
}
|