mirror of https://github.com/zulip/zulip.git
32 lines
958 B
Puppet
32 lines
958 B
Puppet
class kandra::ksplice_uptrack {
|
|
$ksplice_access_key = zulipsecret('secrets', 'ksplice_access_key', '')
|
|
if $ksplice_access_key != '' {
|
|
file { '/etc/uptrack':
|
|
ensure => directory,
|
|
owner => 'root',
|
|
group => 'adm',
|
|
mode => '0750',
|
|
}
|
|
file { '/etc/uptrack/uptrack.conf':
|
|
ensure => file,
|
|
owner => 'root',
|
|
group => 'adm',
|
|
mode => '0640',
|
|
content => template('kandra/uptrack/uptrack.conf.erb'),
|
|
}
|
|
$setup_apt_repo_file = "${facts['zulip_scripts_path']}/lib/setup-apt-repo"
|
|
exec{ 'setup-apt-repo-ksplice':
|
|
command => "${setup_apt_repo_file} --list ksplice",
|
|
unless => "${setup_apt_repo_file} --list ksplice --verify",
|
|
}
|
|
Package { 'uptrack':
|
|
require => [
|
|
Exec['setup-apt-repo-ksplice'],
|
|
File['/etc/uptrack/uptrack.conf'],
|
|
],
|
|
}
|
|
} else {
|
|
warning('No ksplice uptrack key is configured; ksplice is not installed!')
|
|
}
|
|
}
|