Add OpenVPN interface to the trusted zone.

This commit is contained in:
yohan 2024-11-03 21:47:16 +01:00
parent 25046e9054
commit 57bc377ad4

View File

@ -8,7 +8,7 @@
failed_when: "result_openvpn_server_systemd_stop is failed and 'Could not find the requested service' not in result_openvpn_server_systemd_stop.msg" failed_when: "result_openvpn_server_systemd_stop is failed and 'Could not find the requested service' not in result_openvpn_server_systemd_stop.msg"
- name: Check if openvpn-server container is running - name: Check if openvpn-server container is running
command: 'podman ps -q --filter "name=openvpn-server"' command: 'podman ps -q --filter "name=^openvpn-server$"'
changed_when: false changed_when: false
register: podman_ps register: podman_ps
become: true become: true
@ -181,3 +181,12 @@
immediate: true immediate: true
state: enabled state: enabled
become: true become: true
- name: Add OpenVPN interface to the trusted zone
ansible.posix.firewalld:
zone: trusted
interface: tun0
permanent: true
immediate: true
state: enabled
become: true