Saltstack Official Syslog-NG 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.

syslog-ng.conf 1.2KB

10 anni fa
10 anni fa
10 anni fa
10 anni fa
10 anni fa
10 anni fa
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ########################################################################
  2. # File managed by Salt at <{{ source }}>.
  3. # Your changes will be overwritten.
  4. ########################################################################
  5. {%- from "syslog_ng/macro.jinja" import rule_builder %}
  6. @version: {{ syslog_ng.get('version', '3.3') }}
  7. {%- for module in syslog_ng.get('module', []) %}
  8. @module {{ rule_builder(module) }}
  9. {%- endfor %}
  10. {%- for inc in syslog_ng.get('include', []) %}
  11. @include {{ rule_builder(inc) }}
  12. {%- endfor %}
  13. options {
  14. {%- for rule in syslog_ng.get('options', []) %}
  15. {{ rule_builder(rule) }};
  16. {%- endfor %}
  17. };
  18. {%- for obj in ('source', 'destination', 'filter', 'parser', 'rewrite', 'template') %}
  19. {%- for params in syslog_ng.get(obj, []) %}
  20. {% for name, rules in params.items() %}
  21. {{ obj }} {{ name }} {
  22. {%- for rule in rules %}
  23. {{ rule_builder(rule) }};
  24. {%- endfor %}
  25. };
  26. {%- endfor %}
  27. {%- endfor %}
  28. {%- endfor %}
  29. {% for loggers in syslog_ng.get('log', []) -%}
  30. log {
  31. {%- for rule in loggers %}
  32. {{ rule_builder(rule) }};
  33. {%- endfor %}
  34. };
  35. {% endfor %}
  36. {%- for inc in syslog_ng.get('last_include', []) %}
  37. @include {{ rule_builder(inc) }}
  38. {%- endfor %}