Try to ensure that haproxy and varnish get started after VPN comes up on proxies

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-01-02 02:11:43 +00:00
parent fe05fdcb83
commit 543acabdb1
4 changed files with 26 additions and 0 deletions

View file

@ -275,3 +275,6 @@ baseiptables: True
nm_controlled_resolv: False
dns1: "10.5.126.21"
dns2: "10.5.126.22"
# This is a list of services that need to wait for VPN to be up before getting started.
postvpnservices: []

View file

@ -90,6 +90,10 @@ collectd_apache: true
varnish_group: proxies
postvpnservices:
- haproxy
- varnish
# For the MOTD
csi_security_category: Moderate
csi_primary_contact: Fedora Admins - admin@fedoraproject.org

View file

@ -0,0 +1,3 @@
[Unit]
After=openvpn-client@openvpn.service
Requires=openvpn-client@openvpn.service

View file

@ -99,3 +99,19 @@
tags:
- service
- openvpn
- name: Create directories for post-vpn service configs
file: path="/etc/systemd/system/{{item}}.service.d" state=directory
with_items: postvpnservices
when: is_fedora is defined or ansible_distribution_major_version|int == 7
tags:
- service
- openvpn
- name: Deploy postvpn.conf for post-vpn services
copy: src=postvpn.conf dest="/etc/systemd/system/{{item}}.service.d/postvpn.conf"
with_items: postvpnservices
when: is_fedora is defined or ansible_distribution_major_version|int == 7
tags:
- service
- openvpn