try using ansible_distribution_major_version instead of ansible_distribution_version[0]
This commit is contained in:
parent
56f380e1d5
commit
351743ac20
1 changed files with 2 additions and 2 deletions
|
@ -70,11 +70,11 @@
|
|||
action: service name=openvpn@openvpn state=restarted
|
||||
|
||||
- name: restart openvpn (RHEL6)
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_version[0] == 6
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version == "6"
|
||||
action: service name=openvpn state=restarted
|
||||
|
||||
- name: restart openvpn (RHEL7)
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_version[0] == 7
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version == "7"
|
||||
action: service name=openvpn@openvpn state=restarted
|
||||
|
||||
- name: restart postfix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue