Move fix-routes.sh to openvpn base and run it on restart
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
a0e1ee7de8
commit
fe6f551049
4 changed files with 13 additions and 3 deletions
|
@ -87,14 +87,23 @@
|
|||
- name: restart openvpn (Fedora)
|
||||
when: ansible_distribution == "Fedora"
|
||||
action: service name=openvpn@openvpn state=restarted
|
||||
notify:
|
||||
- fix openvpn routing
|
||||
|
||||
- name: restart openvpn (RHEL6)
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 6
|
||||
action: service name=openvpn state=restarted
|
||||
notify:
|
||||
- fix openvpn routing
|
||||
|
||||
- name: restart openvpn (RHEL7)
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 7
|
||||
action: service name=openvpn@openvpn state=restarted
|
||||
notify:
|
||||
- fix openvpn routing
|
||||
|
||||
- name: fix openvpn routing
|
||||
action: shell /etc/openvpn/fix-routing.sh
|
||||
|
||||
- name: restart postfix
|
||||
action: service name=postfix state=restarted
|
||||
|
|
|
@ -20,3 +20,7 @@
|
|||
- restart openvpn (RHEL7)
|
||||
- restart openvpn (RHEL6)
|
||||
|
||||
- name: install fix-routes.sh script
|
||||
copy: src=fix-routes.sh
|
||||
dest=/etc/openvpn/fix-routes.sh
|
||||
owner=root group=root mode=0755
|
||||
|
|
|
@ -17,9 +17,6 @@
|
|||
- { file: client.conf,
|
||||
dest: /etc/openvpn/openvpn.conf,
|
||||
mode: '0644' }
|
||||
- { file: fix-routes.sh,
|
||||
dest: /etc/openvpn/fix-routes.sh,
|
||||
mode: '0755' }
|
||||
- { file: "{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.crt",
|
||||
dest: "/etc/openvpn/client.crt",
|
||||
mode: '0600' }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue