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
efb511116d
commit
9e3509f844
|
@ -84,7 +84,7 @@ outputs:
|
||||||
register: check_docker_cli
|
register: check_docker_cli
|
||||||
check_mode: false
|
check_mode: false
|
||||||
- name: Set noout flag
|
- 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
|
become: true
|
||||||
with_items:
|
with_items:
|
||||||
- noout
|
- noout
|
||||||
|
@ -111,7 +111,7 @@ outputs:
|
||||||
list_concat:
|
list_concat:
|
||||||
- {get_attr: [CephBase, role_data, post_upgrade_tasks]}
|
- {get_attr: [CephBase, role_data, post_upgrade_tasks]}
|
||||||
- - name: Unset noout flag
|
- - 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:
|
with_items:
|
||||||
- noout
|
- noout
|
||||||
- norecover
|
- norecover
|
||||||
|
|
Loading…
Reference in New Issue