Saltstack Official Syslog-NG Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

map.jinja 972B

123456789101112131415161718192021
  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) %}