-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathmap.jinja
35 lines (31 loc) · 933 Bytes
/
map.jinja
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
# vim: ft=jinja
{#- Start imports as #}
{%- import_yaml "zabbix/defaults.yaml" as default_settings %}
{%- import_yaml "zabbix/osfamilymap.yaml" as osfamilymap %}
{%- import_yaml "zabbix/osmap.yaml" as osmap %}
{%- import_yaml "zabbix/osfingermap.yaml" as osfingermap %}
{#- Retrieve the config dict only once #}
{%- set _config = salt['config.get']('zabbix', default={}) %}
{%- set config = salt['grains.filter_by'](
default_settings,
default='zabbix',
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['grains.filter_by'](
_config,
default='lookup'
)
)
)
)
)
%}
{%- set zabbix = config %}