From ccd396eb6f1879d9b84918669c8d13209970e289 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Tue, 18 Feb 2020 12:52:01 +0000 Subject: [PATCH] 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 --- tasks/neutron_post_install.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasks/neutron_post_install.yml b/tasks/neutron_post_install.yml index 2c860fff..ff8bdc07 100644 --- a/tasks/neutron_post_install.yml +++ b/tasks/neutron_post_install.yml @@ -182,3 +182,14 @@ - Restart neutron services when: - "'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']