Browse Source

Add Centos logrotate config to logrotate.sls

pull/375/head
l00d3r 3 years ago
parent
commit
de73752208
No account linked to committer's email address
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      apache/config/logrotate.sls

+ 13
- 0
apache/config/logrotate.sls View File

@@ -8,6 +8,18 @@ apache-config-logrotate-file-managed:
file.managed:
- name: {{ apache.logrotatedir }}
- makedirs: True
{%- if grains.os_family == "RedHat" %}
- contents: |
{{ apache.logdir }}/*log {
missingok
notifempty
sharedscripts
delaycompress
postrotate
/bin/systemctl reload {{ apache.service.name }} > /dev/null 2>/dev/null || true
endscript
}
{% else %}
- contents: |
{{ apache.logdir }}/*.log {
daily
@@ -29,3 +41,4 @@ apache-config-logrotate-file-managed:
fi; \
endscript
}
{% endif %}

Loading…
Cancel
Save