Use haproxy_endpoint_manage role from osa collection rather than common-tasks

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/923363
Change-Id: Ibdda4e869e96b35a6adaf908746ddc4ccad56a60
This commit is contained in:
Jonathan Rosser 2024-07-03 10:02:22 +01:00
parent eccd6c50e4
commit 827a7e340a
26 changed files with 100 additions and 81 deletions

View File

@ -31,7 +31,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: cinder_api-back
haproxy_state: disabled
@ -114,7 +115,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: cinder_api-back
haproxy_state: enabled

View File

@ -31,7 +31,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: neutron_server-back
haproxy_state: disabled
@ -87,7 +88,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: neutron_server-back
haproxy_state: enabled

View File

@ -1,31 +0,0 @@
---
# Copyright 2017, Logan Vig <logan2211@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Set haproxy service state
community.general.haproxy:
socket: /var/run/haproxy.stat
backend: "{{ haproxy_backend | default(omit) }}"
drain: "{{ haproxy_drain | default(False) }}"
host: "{{ inventory_hostname }}"
state: "{{ haproxy_state | default('enabled') }}"
shutdown_sessions: "{{ haproxy_shutdown_sessions | default(False) | bool }}"
wait: "{{ haproxy_wait | default(False) | bool }}"
wait_interval: "{{ haproxy_wait_interval | default(5) }}"
wait_retries: "{{ haproxy_wait_retries | default(24) }}"
weight: "{{ haproxy_weight | default(omit) }}"
delegate_to: "{{ item }}"
with_items: "{{ groups['haproxy'] }}"
tags:
- common-haproxy

View File

@ -51,7 +51,8 @@
when:
- hostvars['localhost']['resolvconf_enabled'] | bool
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: galera-back
haproxy_state: drain
@ -67,7 +68,8 @@
- crontab
post_tasks:
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: galera-back
haproxy_state: enabled

View File

@ -49,7 +49,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: adjutant_api-back
haproxy_state: disabled
@ -72,7 +73,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: adjutant_api-back
haproxy_state: enabled

View File

@ -50,7 +50,8 @@
public: true
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: aodh_api-back
haproxy_state: disabled
@ -78,7 +79,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: aodh_api-back
haproxy_state: enabled

View File

@ -49,7 +49,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: barbican-back
haproxy_state: disabled
@ -76,7 +77,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: barbican-back
haproxy_state: enabled

View File

@ -49,7 +49,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: blazar_api-back
haproxy_state: disabled
@ -80,7 +81,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: blazar_api-back
haproxy_state: enabled

View File

@ -50,7 +50,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: cloudkitty_api-back
haproxy_state: disabled
@ -73,7 +74,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: cloudkitty_api-back
haproxy_state: enabled

View File

@ -52,7 +52,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: designate_api-back
haproxy_state: disabled
@ -79,7 +80,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: designate_api-back
haproxy_state: enabled

View File

@ -49,7 +49,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: glance_api-back
haproxy_state: disabled
@ -92,7 +93,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: glance_api-back
haproxy_state: enabled

View File

@ -49,7 +49,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: gnocchi-back
haproxy_state: disabled
@ -80,7 +81,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: gnocchi-back
haproxy_state: enabled

View File

@ -49,7 +49,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: heat_api-back
haproxy_state: disabled
@ -79,7 +80,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: heat_api-back
haproxy_state: enabled

View File

@ -49,7 +49,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: horizon-back
haproxy_state: disabled
@ -78,7 +79,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: horizon-back
haproxy_state: enabled

View File

@ -49,7 +49,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: ironic_api-back
haproxy_state: disabled
@ -79,7 +80,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: ironic_api-back
haproxy_state: enabled

View File

@ -81,7 +81,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: "keystone_service-back"
haproxy_state: disabled
@ -115,7 +116,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: "keystone_service-back"
haproxy_state: enabled

View File

@ -52,7 +52,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: magnum-back
haproxy_state: disabled
@ -80,7 +81,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: magnum-back
haproxy_state: enabled

View File

@ -58,7 +58,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: manila-back
haproxy_state: disabled
@ -81,7 +82,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: manila-back
haproxy_state: enabled

View File

@ -79,7 +79,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: masakari_api-back
haproxy_state: disabled
@ -107,7 +108,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: masakari_api-back
haproxy_state: enabled

View File

@ -50,7 +50,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: mistral-back
haproxy_state: disabled
@ -81,7 +82,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: mistral-back
haproxy_state: enabled

View File

@ -77,7 +77,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: "{{ backend_name }}-back"
haproxy_state: disabled
@ -120,7 +121,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: "{{ backend_name }}-back"
haproxy_state: enabled

View File

@ -50,7 +50,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: octavia-back
haproxy_state: disabled
@ -80,7 +81,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: octavia-back
haproxy_state: enabled

View File

@ -50,7 +50,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: placement-back
haproxy_state: disabled
@ -80,7 +81,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: placement-back
haproxy_state: enabled

View File

@ -50,7 +50,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: tacker-back
haproxy_state: disabled
@ -71,7 +72,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: tacker-back
haproxy_state: enabled

View File

@ -53,7 +53,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: trove-back
haproxy_state: disabled
@ -80,7 +81,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: trove-back
haproxy_state: enabled

View File

@ -66,7 +66,8 @@
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- name: Disabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: zun_api-back
haproxy_state: disabled
@ -94,7 +95,8 @@
# the load balancer back end for this container
# to available again.
- name: Enabling haproxy backends
include_tasks: common-tasks/haproxy-endpoint-manage.yml
include_role:
name: openstack.osa.haproxy_endpoint_manage
vars:
haproxy_backend: zun_api-back
haproxy_state: enabled