]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
add-osd: use container_exec_cmd fact from mon host
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 6 Aug 2021 15:27:08 +0000 (11:27 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 9 Aug 2021 13:48:23 +0000 (15:48 +0200)
Because we're delegating the task to the first monitor node, we need to be
sure that the container_exec_cmd fact is the one from that node too otherwise
we could have a mismatch on the ceph-mon container name.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1990772
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
infrastructure-playbooks/add-osd.yml

index 4b1f9755fbc95bccac97fe149eb0eb181cd798b6..95eae6b232f74483df32e97e6c073b8e3e94390c 100644 (file)
         add_osd: True
 
     - name: set noup flag
-      command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd set noup"
+      command: "{{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} osd set noup"
       delegate_to: "{{ groups['mons'][0] }}"
       run_once: True
       changed_when: False
 
   post_tasks:
     - name: unset noup flag
-      command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup"
+      command: "{{ hostvars[groups[mon_group_name][0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} osd unset noup"
       delegate_to: "{{ groups['mons'][0] }}"
       run_once: True
       changed_when: False