|
123456789101112131415161718192021222324 |
- # -*- coding: utf-8 -*-
- # vim: ft=jinja
-
- {#- Get the `tplroot` from `tpldir` #}
- {%- set tplroot = tpldir.split('/')[0] %}
- {#- Start imports as #}
- {%- import_yaml tplroot ~ "/defaults.yaml" or {} as default_settings %}
- {%- import_yaml tplroot ~ "/osfamilymap.yaml" or {} as osfamilymap %}
- {%- import_yaml tplroot ~ "/osmap.yaml" or {} as osmap %}
- {%- import_yaml tplroot ~ "/osfingermap.yaml" or {} as osfingermap %}
-
- {%- set defaults = salt['grains.filter_by'](default_settings,
- default='ufw',
- merge=salt['grains.filter_by'](osfamilymap, grain='os_family',
- merge=salt['grains.filter_by'](osmap, grain='os',
- merge=salt['grains.filter_by'](osfingermap, grain='osfinger',
- merge=salt['pillar.get']('ufw:lookup', default={})
- )
- )
- )
- ) %}
-
- {#- Merge the ufw pillar #}
- {%- set ufw = salt['pillar.get']('ufw', default=defaults, merge=True) %}
|