Skip to content

Commit

Permalink
fix(centos-6): has only _one_ service 'openvpn'
Browse files Browse the repository at this point in the history
  • Loading branch information
alxwr committed Jul 13, 2019
1 parent b16756c commit 3d5723d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
23 changes: 14 additions & 9 deletions openvpn/map.jinja
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{% import_yaml "openvpn/defaults.yaml" as defaults %}
{% import_yaml "openvpn/osfamilymap.yaml" as osfamilymap %}
{% import_yaml "openvpn/osmap.yaml" as osmap %}
{% import_yaml "openvpn/osfingermap.yaml" as osfingermap %}

{% do defaults.openvpn.update({'multi_services': salt['grains.has_value']('systemd')}) %}

{% set map = salt['grains.filter_by'](
defaults,
merge=salt['grains.filter_by'](
osfamilymap,
grain='os_family',
merge=salt['grains.filter_by'](
osmap,
grain='os',
merge=salt['pillar.get']('openvpn:lookup', {}),
),
),
base='openvpn')
osfamilymap,
grain='os_family',
merge=salt['grains.filter_by'](
osmap,
grain='os',
merge=salt['grains.filter_by'](
osfingermap,
grain='os',
merge=salt['pillar.get']('openvpn:lookup', {}),
),
),
),
base='openvpn')
%}

{%- macro multipart_param(value, index=None) %}
Expand Down
2 changes: 2 additions & 0 deletions openvpn/osfingermap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CentOS-6:
multi_services: false

0 comments on commit 3d5723d

Please sign in to comment.