From f7b12210325e1028c283005da6e647f2f62f01f4 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Mon, 29 Aug 2022 14:38:02 +0200 Subject: [PATCH] Use active_passive parameter for existing services MariaDB is left unchanged because its custom_member_list uses a different group (mariadb_default_database_shard_hosts). Change-Id: Icefd5a3d02ae4dfeb27401696c35ca2c38e203d3 --- ansible/roles/memcached/defaults/main.yml | 7 +------ ansible/roles/prometheus/defaults/main.yml | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ansible/roles/memcached/defaults/main.yml b/ansible/roles/memcached/defaults/main.yml index 8cd0595ae8..fe0674dfbf 100644 --- a/ansible/roles/memcached/defaults/main.yml +++ b/ansible/roles/memcached/defaults/main.yml @@ -19,12 +19,7 @@ memcached_services: backend_tcp_extra: - "option srvtcpka" - "timeout server 3600s" - custom_member_list: "{{ haproxy_members.split(';') }}" - -#################### -# HAProxy -#################### -haproxy_members: "{% for host in groups['memcached'] %}server {{ hostvars[host].ansible_facts.hostname }} {{ 'api' | kolla_address(host) }}:{{ memcached_port }} check inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}" + active_passive: true #################### # Docker diff --git a/ansible/roles/prometheus/defaults/main.yml b/ansible/roles/prometheus/defaults/main.yml index 65a252101e..70e5a6f509 100644 --- a/ansible/roles/prometheus/defaults/main.yml +++ b/ansible/roles/prometheus/defaults/main.yml @@ -13,7 +13,7 @@ prometheus_services: mode: "http" external: false port: "{{ prometheus_port }}" - custom_member_list: "{{ prometheus_haproxy_members.split(';') }}" + active_passive: "{{ prometheus_active_passive | bool }}" prometheus-node-exporter: container_name: prometheus_node_exporter group: prometheus-node-exporter @@ -132,7 +132,6 @@ prometheus_mysql_exporter_database_user: "{% if use_preconfigured_databases | bo # HAProxy #################### prometheus_active_passive: true -prometheus_haproxy_members: "{% for host in groups['prometheus'] %}server {{ hostvars[host].ansible_facts.hostname }} {{ 'api' | kolla_address(host) }}:{{ prometheus_port }} check inter 2000 rise 2 fall 5{% if not loop.first %}{% if prometheus_active_passive | bool %} backup{% endif %}{% endif %};{% endfor %}" #################### # Blackbox