diff --git a/salt/logstash/etc/pipelines.yml.jinja b/salt/logstash/etc/pipelines.yml.jinja index 07eeacfaf..3ee7a0d3b 100644 --- a/salt/logstash/etc/pipelines.yml.jinja +++ b/salt/logstash/etc/pipelines.yml.jinja @@ -1,4 +1,4 @@ {%- for pl in pipelines %} - pipeline.id: {{ pl }} - path.config: "{{ pipelines[pl].config }}" + path.config: "/usr/share/logstash/pipelines/{{ pl }}/" {% endfor -%} diff --git a/salt/logstash/init.sls b/salt/logstash/init.sls index 6467ec908..0b80caacf 100644 --- a/salt/logstash/init.sls +++ b/salt/logstash/init.sls @@ -115,13 +115,15 @@ ls_pipeline_{{PL}}: {% for CONFIGFILE in PIPELINES[PL].config %} ls_pipeline_{{PL}}_{{CONFIGFILE.split('.')[0]}}: file.managed: - - name: /opt/so/conf/logstash/pipelines/{{PL}}/{{CONFIGFILE}} - source: salt://logstash/pipelines/config/{{CONFIGFILE}} + {% if 'jinja' in CONFIGFILE.split('.')[-1] %} + - name: /opt/so/conf/logstash/pipelines/{{PL}}/{{CONFIGFILE | replace(".jinja", "")}} + - template: jinja + {% else %} + - name: /opt/so/conf/logstash/pipelines/{{PL}}/{{CONFIGFILE}} + {% endif %} - user: 931 - group: 939 - {% if 'jinja' in CONFIGFILE.split('.')[-1] %} - - template: jinja - {% endif %} {% endfor %} {% endfor %}