Update etcd join member, events task to prioritize 'access_ip' over 'ip' for etcd configuration

pull/11725/head
mj-heydarpour 2024-11-19 09:22:42 +03:30
parent 905bc76e6e
commit 0b097e5743
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@
etcd_events_peer_addresses: >- etcd_events_peer_addresses: >-
{% for host in groups['etcd'] -%} {% for host in groups['etcd'] -%}
{%- if hostvars[host]['etcd_events_member_in_cluster'].rc == 0 -%} {%- if hostvars[host]['etcd_events_member_in_cluster'].rc == 0 -%}
{{ "etcd" + loop.index | string }}=https://{{ hostvars[host].etcd_events_access_address | default(hostvars[host].ip | default(hostvars[host]['fallback_ip'])) }}:2382, {{ "etcd" + loop.index | string }}=https://{{ hostvars[host].etcd_events_access_address | default(hostvars[host].access_ip | default(hostvars[host].ip | default(hostvars[host]['fallback_ip']))) }}:2382,
{%- endif -%} {%- endif -%}
{%- if loop.last -%} {%- if loop.last -%}
{{ etcd_member_name }}={{ etcd_events_peer_url }} {{ etcd_member_name }}={{ etcd_events_peer_url }}

View File

@ -20,7 +20,7 @@
etcd_peer_addresses: >- etcd_peer_addresses: >-
{% for host in groups['etcd'] -%} {% for host in groups['etcd'] -%}
{%- if hostvars[host]['etcd_member_in_cluster'].rc == 0 -%} {%- if hostvars[host]['etcd_member_in_cluster'].rc == 0 -%}
{{ "etcd" + loop.index | string }}=https://{{ hostvars[host].etcd_access_address | default(hostvars[host].ip | default(hostvars[host]['fallback_ip'])) }}:2380, {{ "etcd" + loop.index | string }}=https://{{ hostvars[host].etcd_access_address | default(hostvars[host].access_ip | default(hostvars[host].ip | default(hostvars[host]['fallback_ip']))) }}:2380,
{%- endif -%} {%- endif -%}
{%- if loop.last -%} {%- if loop.last -%}
{{ etcd_member_name }}={{ etcd_peer_url }} {{ etcd_member_name }}={{ etcd_peer_url }}