2024-02-06 21:40:19 +01:00
|
|
|
class kandra::ksplice_uptrack {
|
2021-02-26 23:49:15 +01:00
|
|
|
$ksplice_access_key = zulipsecret('secrets', 'ksplice_access_key', '')
|
2021-03-09 23:50:53 +01:00
|
|
|
if $ksplice_access_key != '' {
|
|
|
|
file { '/etc/uptrack':
|
2022-03-16 01:23:53 +01:00
|
|
|
ensure => directory,
|
2021-03-09 23:50:53 +01:00
|
|
|
owner => 'root',
|
2024-01-09 20:20:56 +01:00
|
|
|
group => 'root',
|
|
|
|
mode => '0755',
|
2021-03-09 23:50:53 +01:00
|
|
|
}
|
|
|
|
file { '/etc/uptrack/uptrack.conf':
|
|
|
|
ensure => file,
|
|
|
|
owner => 'root',
|
2024-01-09 20:20:56 +01:00
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
2024-02-06 21:40:19 +01:00
|
|
|
content => template('kandra/uptrack/uptrack.conf.erb'),
|
2021-03-09 23:50:53 +01:00
|
|
|
}
|
2021-05-22 01:23:43 +02:00
|
|
|
$setup_apt_repo_file = "${::zulip_scripts_path}/lib/setup-apt-repo"
|
2021-03-09 23:50:53 +01:00
|
|
|
exec{ 'setup-apt-repo-ksplice':
|
2021-05-22 01:23:43 +02:00
|
|
|
command => "${setup_apt_repo_file} --list ksplice",
|
|
|
|
unless => "${setup_apt_repo_file} --list ksplice --verify",
|
2021-03-09 23:50:53 +01:00
|
|
|
}
|
|
|
|
Package { 'uptrack':
|
|
|
|
require => [
|
|
|
|
Exec['setup-apt-repo-ksplice'],
|
|
|
|
File['/etc/uptrack/uptrack.conf'],
|
|
|
|
],
|
|
|
|
}
|
2021-03-11 00:31:39 +01:00
|
|
|
} else {
|
|
|
|
warning('No ksplice uptrack key is configured; ksplice is not installed!')
|
2021-02-25 23:11:27 +01:00
|
|
|
}
|
|
|
|
}
|