Properly compute hostname when looking for the ceph-mon container

There are some cases when the return value of the ${HOSTNAME) variable
is different from {{ ansible_hostname }}, especially when tls-everywhere
framework is involved.
This purpose of this review is to fix the FFU section that needs to know
the hostname to find the running container on the delegated host.

Change-Id: Ib269a25fcf0db66ad3144c3e20031a4da6e2e2fb
Closes-Bug: #1903537
(cherry picked from commit 4e0f61d9e2)
This commit is contained in:
Francesco Pantano 2020-11-09 14:39:40 +01:00
parent 6e59a84ec0
commit 7ffaf82e7d
1 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ outputs:
register: check_docker_cli
check_mode: false
- name: Set noout flag
shell: "{{ container_client }} exec -u root ceph-mon-${HOSTNAME} ceph osd set {{ item }}"
shell: "{{ container_client }} exec -u root ceph-mon-{{ ansible_hostname }} ceph osd set {{ item }}"
become: true
with_items:
- noout
@ -120,7 +120,7 @@ outputs:
list_concat:
- {get_attr: [CephBase, role_data, post_upgrade_tasks]}
- - name: Unset noout flag
shell: "{{ container_cli }} exec -u root ceph-mon-${HOSTNAME} ceph osd unset {{ item }}"
shell: "{{ container_cli }} exec -u root ceph-mon-{{ ansible_hostname }} ceph osd unset {{ item }}"
with_items:
- noout
- norecover