Add logrotate meta configuration for Heat
- parametrize interval and rotation
Related: PROD-29848
Change-Id: Id059b2abdfc90065521f937fa643b79eae3ed194
diff --git a/heat/meta/logrotate.yml b/heat/meta/logrotate.yml
new file mode 100644
index 0000000..a1e9c6f
--- /dev/null
+++ b/heat/meta/logrotate.yml
@@ -0,0 +1,16 @@
+## Default: Daily rotation with 28 rotations kept
+{%- from "heat/map.jinja" import server with context %}
+{%- if server.get('enabled', False) %}
+job:
+ heat-common:
+ - files:
+ - /var/log/heat/*.log
+ options:
+ - {{ server.get('logrotate', {}).get('interval', 'daily') }}
+ - rotate: {{ server.get('logrotate', {}).get('rotate', 28) }}
+ - missingok
+ - compress
+ - delaycompress
+ - copytruncate
+ - notifempty
+{%- endif %}