|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- ########################################################################
- # File managed by Salt at <{{ source }}>.
- # Your changes will be overwritten.
- ########################################################################
-
- {%- from "syslog_ng/macro.jinja" import rule_builder %}
-
- @version: {{ syslog_ng.get('version', '3.3') }}
-
- {%- for module in syslog_ng.get('module', []) %}
- @module {{ rule_builder(module) }}
- {%- endfor %}
-
- {%- for inc in syslog_ng.get('include', []) %}
- @include {{ rule_builder(inc) }}
- {%- endfor %}
-
- options {
- {%- for rule in syslog_ng.get('options', []) %}
- {{ rule_builder(rule) }};
- {%- endfor %}
- };
-
- {%- for obj in ('source', 'destination', 'filter', 'parser', 'rewrite', 'template') %}
- {%- for params in syslog_ng.get(obj, []) %}
- {% for name, rules in params.items() %}
- {{ obj }} {{ name }} {
- {%- for rule in rules %}
- {{ rule_builder(rule) }};
- {%- endfor %}
- };
- {%- endfor %}
- {%- endfor %}
- {%- endfor %}
-
- {% for loggers in syslog_ng.get('log', []) -%}
- log {
- {%- for rule in loggers %}
- {{ rule_builder(rule) }};
- {%- endfor %}
- };
-
- {% endfor %}
-
- {%- for inc in syslog_ng.get('last_include', []) %}
- @include {{ rule_builder(inc) }}
- {%- endfor %}
|