changing openvpn restart notifications to work on sysvinit and systemd style machines

This commit is contained in:
Tim Flink 2014-09-24 17:32:29 +00:00
parent 79240e3093
commit d6195c2c33
3 changed files with 18 additions and 15 deletions

View file

@ -43,8 +43,9 @@
- install
- openvpn
notify:
- "restart openvpn {{ ansible_distribution_version[0] }}"
- restart openvpn (Fedora)
- restart openvpn (RHEL7)
- restart oepnvpn (RHEL6)
- name: Install the ccd files
file: file src={{ files }}/ccd/ dest=/etc/openvpn/ccd/ recurse=true
@ -54,16 +55,16 @@
- openvpn
- name: enable openvpn service for rhel 6 or Fedora
- name: enable openvpn service for rhel 6
service: name=openvpn state=running enabled=true
when: ansible_distribution_version[0] == 6 or is_fedora is defined
when: ansible_distribution_version[0] == 6
tags:
- service
- openvpn
- name: enable openvpn service for rhel 7
- name: enable openvpn service for rhel 7 or Fedora
service: name=openvpn@openvpn state=running enabled=true
when: ansible_distribution_version[0] == 7
when: ansible_distribution_version[0] == 7 or is_fedora is defined
tags:
- service
- openvpn