ArielGlenn has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/380960 )
Change subject: dumps servers: override nginx log rotation file provided by
package
......................................................................
dumps servers: override nginx log rotation file provided by package
Also use single file for both htmldumps and xmldumps, since they share
the same logrot settings
Bug: T176810
Change-Id: I0b6d342100fa4e6b72ecfcbda6a9492765914b29
---
D modules/dumps/files/web/htmldumps/logrotate.conf
R modules/dumps/files/web/nginx_logrotate.conf
M modules/dumps/manifests/web/htmldumps.pp
A modules/dumps/manifests/web/nginx_logrot.pp
M modules/dumps/manifests/web/xmldumps.pp
5 files changed, 8 insertions(+), 28 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/60/380960/1
diff --git a/modules/dumps/files/web/htmldumps/logrotate.conf
b/modules/dumps/files/web/htmldumps/logrotate.conf
deleted file mode 100644
index 1404bd5..0000000
--- a/modules/dumps/files/web/htmldumps/logrotate.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-# logrotate config for web logs for html dumps server
-# This file is managed by Puppet
-# modules/dumps/files/web/htmldumps/logrotate.conf
-
-/var/log/nginx/*.log
-{
- daily
- rotate 30
- dateext
- missingok
- compress
- delaycompress
- create 0640 www-data adm
- sharedscripts
- postrotate
- [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat
/var/run/nginx.pid`
- endscript
-}
diff --git a/modules/dumps/files/web/xmldumps/logrotate.conf
b/modules/dumps/files/web/nginx_logrotate.conf
similarity index 100%
rename from modules/dumps/files/web/xmldumps/logrotate.conf
rename to modules/dumps/files/web/nginx_logrotate.conf
diff --git a/modules/dumps/manifests/web/htmldumps.pp
b/modules/dumps/manifests/web/htmldumps.pp
index c0bc5a6..1934e2e 100644
--- a/modules/dumps/manifests/web/htmldumps.pp
+++ b/modules/dumps/manifests/web/htmldumps.pp
@@ -26,13 +26,9 @@
variant => 'extras',
}
- logrotate::conf { 'htmldumps-nginx':
- ensure => present,
- source => 'puppet:///modules/dumps/web/xmldumps/logrotate.conf',
- }
-
nginx::site { 'htmldumps':
source => 'puppet:///modules/dumps/web/htmldumps/nginx.conf',
notify => Service['nginx'],
}
+ include dumps::web::nginx_logrot
}
diff --git a/modules/dumps/manifests/web/nginx_logrot.pp
b/modules/dumps/manifests/web/nginx_logrot.pp
new file mode 100644
index 0000000..a7d3aa2
--- /dev/null
+++ b/modules/dumps/manifests/web/nginx_logrot.pp
@@ -0,0 +1,6 @@
+class dumps::web::nginx_logrot {
+ logrotate::conf { 'nginx':
+ ensure => present,
+ source => 'puppet:///modules/dumps/web/nginx_logrotate.conf',
+ }
+}
diff --git a/modules/dumps/manifests/web/xmldumps.pp
b/modules/dumps/manifests/web/xmldumps.pp
index d5bb8a1..5a3f1f8 100644
--- a/modules/dumps/manifests/web/xmldumps.pp
+++ b/modules/dumps/manifests/web/xmldumps.pp
@@ -28,11 +28,7 @@
content => template('dumps/web/xmldumps/nginx.conf.erb'),
notify => Service['nginx'],
}
-
- logrotate::conf { 'xmldumps-nginx':
- ensure => present,
- source => 'puppet:///modules/dumps/web/xmldumps/logrotate.conf',
- }
+ include dumps::web::nginx_logrot
file { '/data/xmldatadumps/public/favicon.ico':
source => 'puppet:///modules/dumps/web/xmldumps/favicon.ico',
--
To view, visit https://gerrit.wikimedia.org/r/380960
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b6d342100fa4e6b72ecfcbda6a9492765914b29
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits