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.

23 lines
675B

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. ---
  4. {#- Get the `tplroot` from `tpldir` #}
  5. {%- set tplroot = tpldir.split("/")[0] %}
  6. {%- from tplroot ~ "/map.jinja" import syslog_ng with context %}
  7. {%- set _mapdata = {
  8. "values": syslog_ng,
  9. } %}
  10. {%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %}
  11. {%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %}
  12. {%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %}
  13. {{ tplroot }}-mapdata-dump:
  14. file.managed:
  15. - name: {{ output_file }}
  16. - source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja
  17. - template: jinja
  18. - context:
  19. map: {{ _mapdata | yaml }}