File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,11 @@ openvpn_config_dir:
4242{%- if grains.os_family == ' FreeBSD' % }
4343openvpn_kldload_if_tap:
4444 kmod.present:
45- - name: if_tap
45+ - name: {{ map .kernel_module_name }}
4646 - persist: True
47+ - unless:
48+ # In case the kernel has the module compiled in, we skip this state.
49+ - sh - c " kldstat -v | grep --quiet --extended-regexp '^\s+[0-9]+ {{ map.kernel_module_name }} $'"
4750 - require_in:
4851 - sls: openvpn.config
4952{%- endif % }
Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ values:
1616 user : openvpn
1717 manage_user : false
1818 manage_group : false
19+ kernel_module_name : if_tuntap
1920...
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ # vim: ft=yaml
3+ #
4+ # Setup variables specific to salt['config.get']('osfinger') == FreeBSD-11.
5+ # You just need to add the key:values for this `osfinger` that differ
6+ # from `defaults.yaml`.
7+ #
8+ # If you do not need to provide defaults via the `osfinger` config,
9+ # you can remove this file or provide at least an empty dict, e.g.
10+ # values: {}
11+ ---
12+ values :
13+ kernel_module_name : if_tap
14+ ...
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ # vim: ft=yaml
3+ #
4+ # Setup variables specific to salt['config.get']('osfinger') == FreeBSD-12.
5+ # You just need to add the key:values for this `osfinger` that differ
6+ # from `defaults.yaml`.
7+ #
8+ # If you do not need to provide defaults via the `osfinger` config,
9+ # you can remove this file or provide at least an empty dict, e.g.
10+ # values: {}
11+ ---
12+ values :
13+ kernel_module_name : if_tap
14+ ...
You can’t perform that action at this time.
0 commit comments