diff --git a/roles/role_deploy_openvpn-server/tasks/main.yml b/roles/role_deploy_openvpn-server/tasks/main.yml index 01b5eb4..f83d89b 100644 --- a/roles/role_deploy_openvpn-server/tasks/main.yml +++ b/roles/role_deploy_openvpn-server/tasks/main.yml @@ -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" - 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 register: podman_ps become: true @@ -181,3 +181,12 @@ immediate: true state: enabled 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