puppet: Move logrotate config into app_frontend_base.

7c023042cf moved the logrotate configuration to being a templated
file, from a static file, but missed that the static file was still
referenced from `zulip_ops::app_frontend`; it only updated
`zulip::profile::app_frontend`.  This caused errors in applying puppet
on any `zulip_ops::app_frontend` host.

Prior to 7c023042cf, the Puppet role was identical between those two
classes; deduplicate the rule by moving the updated template
definition into `zulip::app_frontend_base` which is common to those
two classes and not used in any other classes.
This commit is contained in:
Alex Vandiver 2023-04-19 04:33:56 +00:00 committed by Tim Abbott
parent b910bb107a
commit cace8858f9
3 changed files with 8 additions and 16 deletions

View File

@ -201,6 +201,14 @@ class zulip::app_frontend_base {
group => 'zulip',
mode => '0750',
}
$access_log_retention_days = zulipconf('application_server','access_log_retention_days', 14)
file { '/etc/logrotate.d/zulip':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template('zulip/logrotate/zulip.template.erb'),
}
file { "${zulip::common::nagios_plugins_dir}/zulip_app_frontend":
require => Package[$zulip::common::nagios_plugins],

View File

@ -23,14 +23,6 @@ class zulip::profile::app_frontend {
content => template('zulip/nginx/zulip-enterprise.template.erb'),
notify => Service['nginx'],
}
$access_log_retention_days = zulipconf('application_server','access_log_retention_days', 14)
file { '/etc/logrotate.d/zulip':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template('zulip/logrotate/zulip.template.erb'),
}
file { '/etc/nginx/sites-enabled/zulip-enterprise':
ensure => link,
require => Package[$zulip::common::nginx],

View File

@ -16,14 +16,6 @@ class zulip_ops::app_frontend {
zulip_ops::firewall_allow{ 'http': }
zulip_ops::firewall_allow{ 'https': }
file { '/etc/logrotate.d/zulip':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/zulip/logrotate/zulip',
}
file { "${zulip::common::supervisor_conf_dir}/redis_tunnel.conf":
ensure => file,
require => Package['supervisor', 'autossh'],