浏览代码

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 %}

正在加载...
取消
保存