Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions openvpn/dhparams.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
{#- Some distributions use /etc/openvpn/{client,server} as their working directory #}
{%- set config_dir = map.get("server", {}).get("conf_dir", map.conf_dir) %}
{%- for dh in map.dh_files %}
{%- if loop.first %}
openvpn_dh_config_dir:
file.directory:
- name: {{ config_dir }}
- makedirs: True
{%- endif %}
{%- set dh_file = config_dir ~ "/dh" ~ dh ~ ".pem" %}
openvpn_create_dh_{{ dh }}:
cmd.run:
Expand Down
5 changes: 4 additions & 1 deletion openvpn/general_config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ openvpn_config_dir:
{%- if grains.os_family == 'FreeBSD' %}
openvpn_kldload_if_tap:
kmod.present:
- name: if_tap
- name: {{ map.kernel_module_name }}
- persist: True
- unless:
# In case the kernel has the module compiled in, we skip this state.
- sh -c "kldstat -v | grep --quiet --extended-regexp '^\s+[0-9]+ {{ map.kernel_module_name }}$'"
- require_in:
- sls: openvpn.config
{%- endif %}
1 change: 1 addition & 0 deletions openvpn/parameters/os_family/FreeBSD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ values:
user: openvpn
manage_user: false
manage_group: false
kernel_module_name: if_tap
...