Stop haproxy service on standalone network nodes

Neutron uses haproxy for the metadata service and when the package is
installed the service will be automatically started on debian/ubuntu.
Neutron runs it's own haproxy instances and the systemd service is
not required to be running.

This patch stops the haproxy service for any neutron metadata hosts
which are not in the OSA haproxy_all ansible group.

Change-Id: I04d933007069e2c3164968b8add48db50210e25c
This commit is contained in:
Jonathan Rosser 2020-02-18 12:52:01 +00:00
parent 991b3369b4
commit ccd396eb6f

View File

@ -182,3 +182,14 @@
- Restart neutron services - Restart neutron services
when: when:
- "'bgpvpn' in neutron_plugin_base" - "'bgpvpn' in neutron_plugin_base"
- name: Stop haproxy service on debian derivatives with standalone network nodes
service:
name: haproxy
state: stopped
enabled: false
when:
- ansible_pkg_mgr == 'apt'
- ansible_hostname in groups['neutron_metadata_agent']
- groups['haproxy_all'] is defined
- ansible_hostname not in groups['haproxy_all']