2020-02-12 20:58:59 +08:00
|
|
|
---
|
|
|
|
- name: get current mgr backend - ipv4
|
|
|
|
set_fact:
|
|
|
|
mgr_server_addr: "{{ hostvars[dashboard_backend]['ansible_all_ipv4_addresses'] | ips_in_ranges(public_network.split(',')) | first }}"
|
|
|
|
when: ip_version == 'ipv4'
|
|
|
|
|
|
|
|
- name: get current mgr backend - ipv6
|
|
|
|
set_fact:
|
2020-04-24 02:34:39 +08:00
|
|
|
mgr_server_addr: "{{ hostvars[dashboard_backend]['ansible_all_ipv6_addresses'] | ips_in_ranges(public_network.split(',')) | last }}"
|
2020-02-12 20:58:59 +08:00
|
|
|
when: ip_version == 'ipv6'
|
|
|
|
|
|
|
|
- name: config the current dashboard backend
|
|
|
|
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} config set mgr mgr/dashboard/{{ hostvars[dashboard_backend]['ansible_hostname'] }}/server_addr {{ mgr_server_addr }}"
|
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
|
|
changed_when: false
|
|
|
|
run_once: true
|