Skip to content

Commit 151457b

Browse files
committed
Simplify and fix map.jinja (fixes sysstat_settings is None)
1 parent 65fbbc9 commit 151457b

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

sysstat/map.jinja

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,15 @@
55
{% import_yaml 'sysstat/defaults.yml' as default_settings %}
66

77
{## setup variable using grains['os_family'] based logic ##}
8-
{% set os_family_map = salt['grains.filter_by']({
8+
{% set sysstat_settings = salt['grains.filter_by']({
9+
'Debian': default_settings.sysstat,
910
'RedHat': {
1011
"service": {
1112
"name": "sysstat",
1213
"enabled": False
1314
}
1415
}
15-
}, grain="os_family")
16-
%}
17-
{## Merge the flavor_map to the default settings ##}
18-
{% do default_settings.sysstat.update(os_family_map) %}
19-
20-
{## Merge in sysstat:lookup pillar ##}
21-
{% set sysstat_settings = salt['pillar.get'](
22-
'sysstat:lookup',
23-
default=default_settings.sysstat,
24-
merge=True
25-
)
16+
}, grain="os_family", default='Debian',
17+
merge=salt['pillar.get']('sysstat:lookup')
18+
)
2619
%}

0 commit comments

Comments
 (0)