Remove usage of haproxy-endpoints role

haproxy-endpoints role was used only to manage galera backends.
To have more consistency and as transition was never finished,
we rollback to using inlcuded task.

Also role usage was a bit complex and hard to read. It also had a
drawback that service can be broken before handler run, which makes
endpoint managing a bit useless in this scenario.

As follow-up we should also drop all "Manage LB" handlers in roles.

Change-Id: I1293776f58a799c9e9dd70f8cd076ed2e2b1bdfe
This commit is contained in:
Dmitriy Rabotyagov 2022-06-14 14:33:13 +02:00
parent 411b701681
commit 0a0a1e062e
2 changed files with 13 additions and 12 deletions

View File

@ -317,12 +317,6 @@
version: 4a9217ed0fe9078152435daaa2d3f45b81021b3a
trackbranch: master
shallow_since: '2019-09-14'
- name: haproxy_endpoints
scm: git
src: https://github.com/logan2211/ansible-haproxy-endpoints
version: 8e3a24a35beb16d717072dc83895c5a1f92689fb
trackbranch: master
shallow_since: '2018-03-22'
- name: pacemaker_corosync
scm: git
src: https://github.com/noonedeadpunk/ansible-pacemaker-corosync

View File

@ -38,20 +38,27 @@
- include_tasks: common-tasks/unbound-clients.yml
when:
- hostvars['localhost']['resolvconf_enabled'] | bool
- include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars:
haproxy_backend: galera-back
haproxy_state: drain
when:
- "groups['galera_all'] | length > 1"
roles:
- role: haproxy_endpoints
haproxy_state: disabled
when: "groups['haproxy'] | default([]) | length > 0"
- role: "galera_server"
vars:
galera_install_client: "{{ (galera_root_user == 'root') }}"
galera_install_server: true
- role: haproxy_endpoints
haproxy_state: enabled
when: "groups['haproxy'] | default([]) | length > 0"
- role: "openstack.osa.system_crontab_coordination"
tags:
- crontab
post_tasks:
- include_tasks: common-tasks/haproxy-endpoint-manage.yml
vars:
haproxy_backend: galera-back
haproxy_state: enabled
when:
- "groups['galera_all'] | length > 1"
vars:
galera_server_id: "{{ inventory_hostname | openstack.osa.string_2_int }}"
galera_wsrep_node_name: "{{ container_name | default(inventory_hostname) }}"