From: Guillaume Abrioux Date: Thu, 28 Jan 2021 13:30:27 +0000 (+0100) Subject: facts: always set `container_binary` on monitors X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6222%2Fhead;p=ceph-ansible.git facts: always set `container_binary` on monitors wip Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-facts/tasks/container_binary.yml b/roles/ceph-facts/tasks/container_binary.yml index 8e866bcbf..8cc660ddf 100644 --- a/roles/ceph-facts/tasks/container_binary.yml +++ b/roles/ceph-facts/tasks/container_binary.yml @@ -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, [])) }}" diff --git a/roles/ceph-osd/tasks/common.yml b/roles/ceph-osd/tasks/common.yml index c65a884d6..7e0356858 100644 --- a/roles/ceph-osd/tasks/common.yml +++ b/roles/ceph-osd/tasks/common.yml @@ -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 }