From fb1c3a6eeb059cdffa06345d799e6498c5919b11 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 26 Mar 2015 13:41:48 +0000 Subject: [PATCH] Work around rhel 7.1 systemd template bug: https://bugzilla.redhat.com/show_bug.cgi?id=1206007 --- roles/openvpn/client/tasks/main.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/roles/openvpn/client/tasks/main.yml b/roles/openvpn/client/tasks/main.yml index 29ddec05fe..bf273b3a9e 100644 --- a/roles/openvpn/client/tasks/main.yml +++ b/roles/openvpn/client/tasks/main.yml @@ -38,8 +38,23 @@ - service - openvpn -- name: enable openvpn service for rhel 7 - service: name=openvpn@openvpn state=running enabled=true +# +# this is a workaround for a rhel7.1 bug: +# https://bugzilla.redhat.com/show_bug.cgi?id=1206007 +# Go back to using the service module when thats fixed. +# + +- name: enable openvpn service for rhel 7.1 + file: state=link src=/usr/lib/systemd/system/openvpn@.service dest=/etc/systemd/system/multi-user.target.wants/openvpn@.service owner=root group=root + when: ansible_distribution_major_version == '7' + notify: + - reload systemd + tags: + - service + - openvpn + +- name: Make sure openvpn is running in rhel 7.1 + service: name=openvpn@openvpn state=running when: ansible_distribution_major_version == '7' tags: - service