Skip to content

Commit b2c03c1

Browse files
committed
Merge pull request #10 from keesbos/fixes
Fixes typos map.jinja
2 parents f009eca + 151457b commit b2c03c1

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

sysstat/config.sls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ sysstat-config:
1515
- template: jinja
1616
- defaults:
1717
enabled: "{{ config_settings.enabled }}"
18-
sa1_options: {{ config_settings.sa1_opts }}
19-
sa2_options: {{ config_settings.sa2_opts }}
20-
{% if systat_settings.service.enabled %}
18+
sa1_options: {{ config_settings.sa1_options }}
19+
sa2_options: {{ config_settings.sa2_options }}
20+
{% if sysstat_settings.service.enabled %}
2121
- listen_in:
2222
- service: sysstat-service
2323
{% endif %}

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

sysstat/package.sls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{## import settings from map.jinja ##}
55
{% from "sysstat/map.jinja" import sysstat_settings with context %}
66
7-
systat-pkg:
7+
sysstat-pkg:
88
pkg.installed:
9-
- name: {{ systat_settings.pkg }}
9+
- name: {{ sysstat_settings.pkg }}
1010
- failhard: True

sysstat/service.sls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
{## import settings from map.jinja ##}
55
{% from "sysstat/map.jinja" import sysstat_settings with context %}
66
7-
{% if systat_settings.service.enabled %}
8-
systat-service:
7+
{% if sysstat_settings.service.enabled %}
8+
sysstat-service:
99
service.running:
10-
- name: {{ systat_settings.service.name }}
10+
- name: {{ sysstat_settings.service.name }}
1111
- enable: True
1212
{% endif %}

0 commit comments

Comments
 (0)