Merge "Normalize the server_addr dashboard backend"

This commit is contained in:
Zuul 2022-05-16 10:18:55 +00:00 committed by Gerrit Code Review
commit b809b45f0a
1 changed files with 3 additions and 3 deletions

View File

@ -16,20 +16,20 @@
- name: Get the current mgr
command: |
{{ container_cli }} ps -a -f 'name=ceph-?(.*)-mgr.*' --format \{\{\.Names\}\}
{{ container_cli }} ps -a -f 'name=ceph-?(.*)-mgr.*' --format \{\{\.Command\}\} --no-trunc
register: ceph_mgr
become: true
delegate_to: "{{ dashboard_backend }}"
- name: Check the resulting mgr container instance
debug:
msg: "{{ ceph_mgr.stdout | regex_replace('^ceph-?(.*)-mgr.', '') }}"
msg: "{{ ceph_mgr.stdout | regex_replace('^-n mgr.(.*)(?P<inst>) -f (.*)+$', '\\1') }}"
when: tripleo_cephadm_verbose | bool
- name: config the current dashboard backend
command: |
{{ tripleo_cephadm_ceph_cli }} config set \
mgr mgr/dashboard/{{ ceph_mgr.stdout | regex_replace('^ceph-?(.*)-mgr.', '') }}/server_addr \
mgr mgr/dashboard/{{ ceph_mgr.stdout | regex_replace('^-n mgr.(.*)(?P<inst>) -f (.*)+$', '\\1') }}/server_addr \
{{ hostvars[dashboard_backend][tripleo_ceph_dashboard_net] }}
become: true
changed_when: false