xoxys.openvpn_client/handlers/main.yml

10 lines
256 B
YAML
Raw Normal View History

2020-05-15 11:21:59 +02:00
---
- name: Restart openvpn client
service:
name: "openvpn@{{ openvpn_client_name }}"
2020-05-15 15:24:17 +02:00
state: "{{ 'restarted' if openvpn_service_state == 'started' else 'stopped' }}"
2020-05-15 11:21:59 +02:00
enabled: yes
listen: __openvpn_restart
become: True
become_user: root