<commit_before># -*- coding: utf-8 -*-
# vim: ft=jinja

{## Start with  defaults from defaults.yaml ##}
{% import_yaml "rsyslog/defaults.yaml" as default_settings %}

{##
Setup variable using grains['os_family'] based logic, only add key:values here
that differ from whats in defaults.yaml
##}
{% set os_family_map = salt['grains.filter_by']({
    'Debian': {},
    'RedHat': {
      'workdirectory': '/var/lib/rsyslog',
    },
    'Arch': {},
  }, grain='os_family', merge=salt['pillar.get']('rsyslog:lookup')) 
%}

{## Merge the flavor_map to the default settings ##}
{% do default_settings.rsyslog.update(os_family_map) %}

{## Merge in salt:lookup pillar ##}
{% set rsyslog = salt['pillar.get'](
    'rsyslog',
    default=default_settings.rsyslog,
    merge=True)
%}<commit_msg>add support for openSUSE / SLES<commit_after># -*- coding: utf-8 -*-
# vim: ft=jinja

{## Start with  defaults from defaults.yaml ##}
{% import_yaml "rsyslog/defaults.yaml" as default_settings %}

{##
Setup variable using grains['os_family'] based logic, only add key:values here
that differ from whats in defaults.yaml
##}
{% set os_family_map = salt['grains.filter_by']({
    'Debian': {},
    'RedHat': {
      'workdirectory': '/var/lib/rsyslog',
    },
    'Arch': {},
    'Suse': {},
  }, grain='os_family', merge=salt['pillar.get']('rsyslog:lookup')) 
%}

{## Merge the flavor_map to the default settings ##}
{% do default_settings.rsyslog.update(os_family_map) %}

{## Merge in salt:lookup pillar ##}
{% set rsyslog = salt['pillar.get'](
    'rsyslog',
    default=default_settings.rsyslog,
    merge=True)
%}
{'fraction_non_alphanumeric': 0.179375, 'fraction_numerical': 0.00125, 'mean_word_length': 4.318936877076412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5786014', 'n_tokens_mistral': 588, 'n_tokens_neox': 562, 'n_words': 123}