mirror of
https://github.com/saltstack-formulas/apache-formula.git
synced 2025-04-17 10:10:26 +00:00
Add Centos logrotate config to logrotate.sls
This commit is contained in:
parent
c6895c531c
commit
de73752208
1 changed files with 13 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue