瀏覽代碼

Add Centos logrotate config to logrotate.sls

pull/375/head
l00d3r 3 年之前
父節點
當前提交
de73752208
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 13 行新增0 行删除
  1. +13
    -0
      apache/config/logrotate.sls

+ 13
- 0
apache/config/logrotate.sls 查看文件

@@ -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…
取消
儲存