Browse Source

Merge "Add dateext and related parameters for logrotate" into stable/queens

tags/8.5.1
Zuul 1 month ago
parent
commit
04090be942

+ 15
- 0
manifests/profile/base/logging/logrotate.pp View File

@@ -79,6 +79,18 @@
79 79
 #    Configures forced purge period for rotated logs.
80 80
 #    Overrides the rotation and rotate settings.
81 81
 #
82
+#  [*dateext*]
83
+#    (optional) Defaults to undef.
84
+#    Configures the dateext parameter.
85
+#
86
+#  [*dateformat*]
87
+#    (optional) Defaults to undef.
88
+#    Configures the dateformat parameter used with dateext parameter.
89
+#
90
+#  [*dateyesterday*]
91
+#    (optional) Defaults to undef.
92
+#    Configures the dateyesterday parameter used with dateext parameter.
93
+#
82 94
 # DEPRECATED PARAMETERS
83 95
 #
84 96
 #  [*size*]
@@ -102,6 +114,9 @@ class tripleo::profile::base::logging::logrotate (
102 114
   $maxsize          = '10M',
103 115
   $rotate           = 14,
104 116
   $purge_after_days = 14,
117
+  $dateext          = undef,
118
+  $dateformat       = undef,
119
+  $dateyesterday    = undef,
105 120
   # DEPRECATED PARAMETERS
106 121
   $size             = undef,
107 122
 ) {

+ 5
- 0
releasenotes/notes/add-dateext-and-related-parameters-58dd288c74b818f7.yaml View File

@@ -0,0 +1,5 @@
1
+---
2
+other:
3
+  - |
4
+    Add dateext and related paramters for containerized logrotate service to
5
+    find easily when logfiles were rotated.

+ 9
- 0
templates/logrotate/containers_logrotate.conf.erb View File

@@ -19,4 +19,13 @@
19 19
 <%- if @compress %>
20 20
   compress
21 21
 <%- end %>
22
+<%- if @dateext %>
23
+  dateext
24
+<%- if @dateformat %>
25
+  dateformat <%= @dateformat %>
26
+<%- end %>
27
+<%- if @dateyesterday %>
28
+  dateyesterday
29
+<%- end %>
30
+<%- end %>
22 31
 }

Loading…
Cancel
Save