mirror of https://github.com/zulip/zulip.git
puppet: Abstract out nagios-plugins package.
This commit is contained in:
parent
04372e3300
commit
801b04c057
|
@ -10,6 +10,11 @@ class zulip::app_frontend_base {
|
|||
]
|
||||
zulip::safepackage { $web_packages: ensure => 'installed' }
|
||||
|
||||
$nagios_plugins = $::osfamily ? {
|
||||
'debian' => 'nagios-plugins-basic',
|
||||
'redhat' => 'nagios-plugins',
|
||||
}
|
||||
|
||||
file { '/etc/nginx/zulip-include/app':
|
||||
require => Package['nginx-full'],
|
||||
owner => 'root',
|
||||
|
@ -136,7 +141,7 @@ class zulip::app_frontend_base {
|
|||
ensure => absent,
|
||||
}
|
||||
file { '/usr/lib/nagios/plugins/zulip_app_frontend':
|
||||
require => Package[nagios-plugins-basic],
|
||||
require => Package[$nagios_plugins],
|
||||
recurse => true,
|
||||
purge => true,
|
||||
owner => 'root',
|
||||
|
|
|
@ -33,6 +33,7 @@ class zulip::base {
|
|||
# Needed for the cron jobs installed by puppet
|
||||
'cron',
|
||||
]
|
||||
$nagios_plugins = 'nagios-plugins-basic'
|
||||
}
|
||||
'redhat': {
|
||||
$release_name = "${::operatingsystem}${::operatingsystemmajrelease}"
|
||||
|
@ -46,6 +47,7 @@ class zulip::base {
|
|||
'nagios-plugins', # there is no dummy package on CentOS 7
|
||||
'cronie'
|
||||
]
|
||||
$nagios_plugins = 'nagios-plugins'
|
||||
}
|
||||
default: {
|
||||
fail('osfamily not supported')
|
||||
|
@ -156,7 +158,7 @@ class zulip::base {
|
|||
}
|
||||
|
||||
file { '/usr/lib/nagios/plugins/zulip_base':
|
||||
require => Package[nagios-plugins-basic],
|
||||
require => Package[$nagios_plugins],
|
||||
recurse => true,
|
||||
purge => true,
|
||||
owner => 'root',
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
#
|
||||
# Depends on zulip::base to have installed `nagios-plugins-basic`.
|
||||
class zulip::nagios {
|
||||
$nagios_plugins = $::osfamily ? {
|
||||
'debian' => 'nagios-plugins-basic',
|
||||
'redhat' => 'nagios-plugins',
|
||||
}
|
||||
file { '/usr/lib/nagios/plugins/zulip_nagios_server':
|
||||
require => Package[nagios-plugins-basic],
|
||||
require => Package[$nagios_plugins],
|
||||
recurse => true,
|
||||
purge => true,
|
||||
owner => 'root',
|
||||
|
|
|
@ -39,7 +39,7 @@ class zulip::postgres_appdb_base {
|
|||
source => 'puppet:///modules/zulip/postgresql/zulip_english.stop',
|
||||
}
|
||||
file { '/usr/lib/nagios/plugins/zulip_postgres_appdb':
|
||||
require => Package[nagios-plugins-basic],
|
||||
require => Package[$zulip::postgres_common::nagios_plugins],
|
||||
recurse => true,
|
||||
purge => true,
|
||||
owner => 'root',
|
||||
|
|
Loading…
Reference in New Issue