[feat] Add common logrotate cron+config

This commit is contained in:
William Wernert
2020-10-05 13:57:36 -04:00
parent f7daa391c7
commit e6cb75ce7e
3 changed files with 48 additions and 0 deletions
+21
View File
@@ -192,6 +192,27 @@ sensorrotateconf:
{% endif %}
commonlogrotatescript:
file.managed:
- name: /usr/local/bin/common-rotate
- source: salt://common/cron/common-rotate
- mode: 755
commonlogrotateconf:
file.managed:
- name: /opt/so/conf/log-rotate.conf
- source: salt://common/files/log-rotate.conf
- mode: 644
/usr/local/bin/common-rotate:
cron.present:
- user: root
- minute: '1'
- hour: '0'
- daymonth: '*'
- month: '*'
- dayweek: '*'
{% if role in ['eval', 'manager', 'managersearch', 'standalone'] %}
# Add config backup
/usr/sbin/so-config-backup > /dev/null 2>&1: