Saltstack Official Apache Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 satır
1008B

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. {%- set tplroot = tpldir.split('/')[0] %}
  4. {%- from tplroot ~ "/map.jinja" import apache with context %}
  5. apache-config-logrotate-file-managed:
  6. file.managed:
  7. - name: {{ apache.logrotatedir }}
  8. - makedirs: True
  9. - contents: |
  10. {{ apache.logdir }}/*.log {
  11. daily
  12. missingok
  13. rotate 14
  14. compress
  15. delaycompress
  16. notifempty
  17. create 640 root adm
  18. sharedscripts
  19. postrotate
  20. if /etc/init.d/{{ apache.service.name }} status >/dev/null; then \
  21. /etc/init.d/{{ apache.service.name }} reload >/dev/null; \
  22. fi;
  23. endscript
  24. prerotate
  25. if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
  26. run-parts /etc/logrotate.d/httpd-prerotate; \
  27. fi; \
  28. endscript
  29. }