init.sls 797 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #
  2. # Rsyslog configuration
  3. #
  4. {% set roles = pillar.get ('roles', []) %}
  5. rsyslog:
  6. pkg.installed:
  7. - name: rsyslog
  8. service.running:
  9. - enable: True
  10. /etc/rsyslog.conf:
  11. file.managed:
  12. - watch_in:
  13. - service: rsyslog
  14. {% if 'logserver' in roles %}
  15. - source: salt://rsyslog/rsyslog.conf.logserver
  16. {% else %}
  17. - source: salt://rsyslog/rsyslog.conf
  18. {% endif %}
  19. {% if 'logserver' in roles %}
  20. /etc/rsyslog.d/ffho.conf:
  21. file.managed:
  22. - source: salt://rsyslog/ffho.conf
  23. /etc/rsyslog.d/ffho:
  24. file.recurse:
  25. - source: salt://rsyslog/ffho
  26. - file_mode: 644
  27. - dir_mode: 755
  28. - user: root
  29. - group: root
  30. - clean: true
  31. - watch_in:
  32. - service: rsyslog
  33. /etc/logrotate.d/ffho:
  34. file.managed:
  35. - source: salt://rsyslog/ffho.logrotate
  36. {% endif %}