]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
facts: always set `container_binary` on monitors guits-add-osd-fix 6222/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 28 Jan 2021 13:30:27 +0000 (14:30 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 28 Jan 2021 13:30:27 +0000 (14:30 +0100)
wip

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-facts/tasks/container_binary.yml
roles/ceph-osd/tasks/common.yml

index 8e866bcbf15151b2983450cd8262ba19a7702bbc..8cc660ddf2a084a0526c508dc3a1155ba6dabb0f 100644 (file)
@@ -6,4 +6,9 @@
 
 - name: set_fact container_binary
   set_fact:
-    container_binary: "{{ 'podman' if (podman_binary.stat.exists and ansible_distribution == 'Fedora') or (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '8') else 'docker' }}"
\ No newline at end of file
+    container_binary: "{{ 'podman' if (podman_binary.stat.exists and ansible_distribution == 'Fedora') or (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '8') else 'docker' }}"
+  delegate_to: "{{ item }}"
+  delegate_facts: True
+  run_once: true
+  with_items:
+    - "{{ ansible_play_hosts_all | union(groups.get(mon_group_name, [])) }}"
index c65a884d6db70a3a308be412c2220f8300fd77d4..7e0356858599f87a9308cfe6be66446766fca084 100644 (file)
@@ -19,7 +19,7 @@
     state: info
   environment:
     CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
-    CEPH_CONTAINER_BINARY: "{{ container_binary }}"
+    CEPH_CONTAINER_BINARY: "{{ hostvars[groups.get(mon_group_name)[0]]['container_binary'] }}"
   register: _osd_keys
   with_items:
     - { name: "client.bootstrap-osd", path: "/var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring", copy_key: true }