Browse Source

Fix variable import

tags/v0.2.0
Nicolas Rodriguez 7 years ago
parent
commit
f3115d7019
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      syslog_ng/files/syslog-ng.conf

+ 7
- 7
syslog_ng/files/syslog-ng.conf View File

@@ -1,24 +1,24 @@
{%- from "syslog_ng/macro.jinja" import rule_builder -%}
{%- set syslog_config = pillar.get('syslog_ng', {}) -%}
{%- from "syslog_ng/map.jinja" import syslog_ng with context -%}

@version: {{ syslog_config.get('version', '3.3') }}
@version: {{ syslog_ng.get('version', '3.3') }}

{%- for module in syslog_config.get('module', []) %}
{%- for module in syslog_ng.get('module', []) %}
@module {{ rule_builder(module) }}
{%- endfor %}

{%- for inc in syslog_config.get('include', []) %}
{%- for inc in syslog_ng.get('include', []) %}
@include {{ rule_builder(inc) }}
{%- endfor %}

options {
{%- for rule in syslog_config.get('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_config.get(obj, []) %}
{%- for params in syslog_ng.get(obj, []) %}
{% for name, rules in params.items() %}
{{ obj }} {{ name }} {
{%- for rule in rules %}
@@ -29,7 +29,7 @@ options {
{%- endfor %}
{%- endfor %}

{% for loggers in syslog_config.get('log', []) -%}
{% for loggers in syslog_ng.get('log', []) -%}
log {
{%- for rule in loggers %}
{{ rule_builder(rule) }};

Loading…
Cancel
Save