Saltstack Official Syslog-NG Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122
  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 }}