Saltstack Official Syslog-NG Formula
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

22 lines
972B

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {% import_yaml "syslog_ng/defaults.yml" as defaults %}
  4. {% import_yaml "syslog_ng/os_family_map.yml" as os_family_map %}
  5. {% import_yaml "syslog_ng/os_codename_map.yml" as os_codename_map %}
  6. {# get the settings for the os_family grain #}
  7. {% set osfam = salt['grains.filter_by'](os_family_map) or {} %}
  8. {# get the settings for the oscodename grain, os_family data will override oscodename data #}
  9. {% set oscode = salt['grains.filter_by'](os_codename_map, grain='oscodename', merge=osfam) or {} %}
  10. {# merge the os family/os codename specific data over the defaults #}
  11. {% do defaults.syslog_ng.update(oscode) %}
  12. {# merge the pillar:lookup dict into the defaults/os specific dict #}
  13. {% set lookup = salt['pillar.get']('syslog_ng:lookup', default=defaults.syslog_ng, merge=True) %}
  14. {# merge the actual syslog_ng pillar into the above combined dict #}
  15. {% set syslog_ng = salt['pillar.get']('syslog_ng', default=lookup, merge=True) %}