puppet: Factor out nagios plugins installation.

This commit is contained in:
Alex Vandiver 2024-07-29 16:09:28 +00:00 committed by Tim Abbott
parent 94795500b5
commit 59cf3379c7
4 changed files with 17 additions and 27 deletions

View File

@ -240,15 +240,7 @@ class zulip::app_frontend_base {
content => template('zulip/logrotate/zulip.template.erb'), content => template('zulip/logrotate/zulip.template.erb'),
} }
file { "${zulip::common::nagios_plugins_dir}/zulip_app_frontend": zulip::nagios_plugins {'zulip_app_frontend': }
require => Package[$zulip::common::nagios_plugins],
recurse => true,
purge => true,
owner => 'root',
group => 'root',
mode => '0755',
source => 'puppet:///modules/zulip/nagios_plugins/zulip_app_frontend',
}
# This cron job does nothing unless RATE_LIMIT_TOR_TOGETHER is enabled. # This cron job does nothing unless RATE_LIMIT_TOR_TOGETHER is enabled.
zulip::cron { 'fetch-tor-exit-nodes': zulip::cron { 'fetch-tor-exit-nodes':

View File

@ -0,0 +1,14 @@
# @summary Installs a subdirectory from puppet/zulip/files/nagios_plugins/
define zulip::nagios_plugins () {
include zulip::common
file { "${zulip::common::nagios_plugins_dir}/${name}":
require => Package[$zulip::common::nagios_plugins],
recurse => true,
purge => true,
owner => 'root',
group => 'root',
mode => '0755',
source => "puppet:///modules/zulip/nagios_plugins/${name}",
}
}

View File

@ -62,15 +62,7 @@ class zulip::postgresql_base {
mode => '0644', mode => '0644',
source => 'puppet:///modules/zulip/postgresql/zulip_english.stop', source => 'puppet:///modules/zulip/postgresql/zulip_english.stop',
} }
file { "${zulip::common::nagios_plugins_dir}/zulip_postgresql": zulip::nagios_plugins { 'zulip_postgresql': }
require => Package[$zulip::common::nagios_plugins],
recurse => true,
purge => true,
owner => 'root',
group => 'root',
mode => '0755',
source => 'puppet:///modules/zulip/nagios_plugins/zulip_postgresql',
}
$pgroonga = zulipconf('machine', 'pgroonga', false) $pgroonga = zulipconf('machine', 'pgroonga', false)
if $pgroonga { if $pgroonga {

View File

@ -136,13 +136,5 @@ class zulip::profile::base {
mode => '0750', mode => '0750',
} }
file { "${zulip::common::nagios_plugins_dir}/zulip_base": zulip::nagios_plugins { 'zulip_base': }
require => Package[$zulip::common::nagios_plugins],
recurse => true,
purge => true,
owner => 'root',
group => 'root',
mode => '0755',
source => 'puppet:///modules/zulip/nagios_plugins/zulip_base',
}
} }