Giuseppe Lavagetto has submitted this change and it was merged.
Change subject: confd: do not declare rsyslog/logrotate rules for upstart-based
distros.
......................................................................
confd: do not declare rsyslog/logrotate rules for upstart-based distros.
Since upstart will log all confd messages to its
/var/log/upstart/confd.log file anyways, we don't need the rsyslog or
logrotate rules at all.
Change-Id: Idcc32c92ef6d87934f8646f41690a1c6d48d1ad2
---
M modules/confd/manifests/init.pp
1 file changed, 22 insertions(+), 11 deletions(-)
Approvals:
Giuseppe Lavagetto: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/confd/manifests/init.pp b/modules/confd/manifests/init.pp
index 9ca332d..4692aca 100644
--- a/modules/confd/manifests/init.pp
+++ b/modules/confd/manifests/init.pp
@@ -74,17 +74,28 @@
}
}
- # Log to a dedicated file
- file { '/etc/logrotate.d/confd':
- source => 'puppet:///modules/confd/logrotate.conf',
- owner => 'root',
- group => 'root',
- mode => '0444',
- }
+ # Upstart will log confd output to a dedicated file in /var/log/upstart
already
+ if $::initsystem == 'upstart' {
+ file { '/etc/logrotate.d/confd':
+ ensure => absent,
+ }
- rsyslog::conf { 'confd':
- source => 'puppet:///modules/confd/rsyslog.conf',
- priority => 20,
- require => File['/etc/logrotate.d/confd'],
+ rsyslog::conf { 'confd':
+ ensure => absent,
+ }
+ } else {
+ # Log to a dedicated file
+ file { '/etc/logrotate.d/confd':
+ source => 'puppet:///modules/confd/logrotate.conf',
+ owner => 'root',
+ group => 'root',
+ mode => '0444',
+ }
+
+ rsyslog::conf { 'confd':
+ source => 'puppet:///modules/confd/rsyslog.conf',
+ priority => 20,
+ require => File['/etc/logrotate.d/confd'],
+ }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/221069
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idcc32c92ef6d87934f8646f41690a1c6d48d1ad2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits