From 2dfae465fc87ba06f37710f919bdaf3ce18732c9 Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Wed, 28 Aug 2019 00:05:39 +0200 Subject: [PATCH] fix(service): make sure the now obsolete systemd services are disabled --- openvpn/service.sls | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openvpn/service.sls b/openvpn/service.sls index 4d0ece9..1048657 100644 --- a/openvpn/service.sls +++ b/openvpn/service.sls @@ -17,6 +17,14 @@ and openvpn-{client,server} as their service. #} {% set service_name = map.get(type, {}).get("service", map.service) ~ '@' ~ name %} +{#- + For an successful upgrade we need to make sure the old services are deactivated. + This affects at least Debian. +#} +obsolete_openvpn_{{ name }}_service: + service.dead: + - name: {{ map.service ~ '@' ~ name }} + - enable: False {% else %} {% set service_name = map.service ~ '_' ~ name %} {% endif %}