We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1859248 commit 148f0aeCopy full SHA for 148f0ae
openvpn/general_config.sls
@@ -42,8 +42,11 @@ openvpn_config_dir:
42
{%- if grains.os_family == 'FreeBSD' %}
43
openvpn_kldload_if_tap:
44
kmod.present:
45
- - name: if_tap
+ - name: {{ map.kernel_module_name }}
46
- 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 }}$'"
50
- require_in:
51
- sls: openvpn.config
52
{%- endif %}
openvpn/parameters/os_family/FreeBSD.yaml
@@ -16,4 +16,5 @@ values:
16
user: openvpn
17
manage_user: false
18
manage_group: false
19
+ kernel_module_name: if_tap
20
...
0 commit comments