Puppet Class: spark::historyserver::install
- Defined in:
- manifests/historyserver/install.pp
Overview
Class: spark::historyserver::install
Install Spark History Server packages.
5 6 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 |
# File 'manifests/historyserver/install.pp', line 5
class spark::historyserver::install {
include ::stdlib
contain spark::common::postinstall
$path = '/sbin:/usr/sbin:/bin:/usr/bin'
case $::osfamily {
# Debian really fucked up design around postinstallation scripts
'debian': {
exec {'debian-fuckup':
command => 'echo "#! /bin/sh" > /etc/init.d/spark-history-server && chmod +x /etc/init.d/spark-history-server',
path => $path,
creates => '/etc/init.d/spark-history-server',
}
->
package{$spark::packages['historyserver']:
ensure => installed,
}
->
exec{'debian-restore-fuckup':
command => 'mv -v /etc/init.d/spark-history-server.dpkg-dist /etc/init.d/spark-history-server',
path => $path,
onlyif => 'test -f /etc/init.d/spark-history-server.dpkg-dist',
}
}
default: {
ensure_packages($spark::packages['historyserver'])
}
}
Package[$spark::packages['historyserver']] -> Class['spark::common::postinstall']
}
|