Rely on the HOSTNAME var to resolve the mon container name
We previously used the {{ ansible_hostname }} variable as a replacement
for ${HOSTNAME} when the ceph-mon container name needed to be resolved
during the FFU process.
However, sounds like {{ ansible_hostname }} doesn't return the value of
the delegated host [1].
The purpose of this change is to compute the hostname relying on the
exported env var and it's supposed to fix the tls-everywhere use case
(when a more complex domain is provided).
[1] https://github.com/ansible/ansible/issues/14958
Closes-Bug: #1903537
Change-Id: I77e3e5e4336a5d3f76b10d09cf7034023fbec075
(cherry picked from commit 3e2371f71f
)
This commit is contained in:
parent
f3c4f47839
commit
4142778f8b
|
@ -93,7 +93,7 @@ outputs:
|
|||
register: check_docker_cli
|
||||
check_mode: false
|
||||
- name: Set noout flag
|
||||
shell: "{{ container_client }} exec -u root ceph-mon-{{ ansible_hostname }} ceph osd set {{ item }}"
|
||||
shell: "{{ container_client }} exec -u root ceph-mon-${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-{{ ansible_hostname }} ceph osd unset {{ item }}"
|
||||
shell: "{{ container_cli }} exec -u root ceph-mon-${HOSTNAME%%.*} ceph osd unset {{ item }}"
|
||||
with_items:
|
||||
- noout
|
||||
- norecover
|
||||
|
|
Loading…
Reference in New Issue