mirror of https://github.com/zulip/zulip.git
puppet: Only install ksplice uptrack if there is an access key.
This commit is contained in:
parent
86c883ceb0
commit
a5b29398fc
|
@ -1,27 +1,29 @@
|
|||
class zulip_ops::ksplice_uptrack {
|
||||
file { '/etc/uptrack':
|
||||
ensure => 'directory',
|
||||
owner => 'root',
|
||||
group => 'adm',
|
||||
mode => '0750',
|
||||
}
|
||||
$ksplice_access_key = zulipsecret('secrets', 'ksplice_access_key', '')
|
||||
file { '/etc/uptrack/uptrack.conf':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'adm',
|
||||
mode => '0640',
|
||||
content => template('zulip_ops/uptrack/uptrack.conf.erb'),
|
||||
}
|
||||
$setup_apt_repo_file = "${::zulip_scripts_path}/lib/setup-apt-repo-ksplice"
|
||||
exec{ 'setup-apt-repo-ksplice':
|
||||
command => $setup_apt_repo_file,
|
||||
unless => "${setup_apt_repo_file} --verify",
|
||||
}
|
||||
Package { 'uptrack':
|
||||
require => [
|
||||
Exec['setup-apt-repo-ksplice'],
|
||||
File['/etc/uptrack/uptrack.conf'],
|
||||
],
|
||||
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('zulip_ops/uptrack/uptrack.conf.erb'),
|
||||
}
|
||||
$setup_apt_repo_file = "${::zulip_scripts_path}/lib/setup-apt-repo-ksplice"
|
||||
exec{ 'setup-apt-repo-ksplice':
|
||||
command => $setup_apt_repo_file,
|
||||
unless => "${setup_apt_repo_file} --verify",
|
||||
}
|
||||
Package { 'uptrack':
|
||||
require => [
|
||||
Exec['setup-apt-repo-ksplice'],
|
||||
File['/etc/uptrack/uptrack.conf'],
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue