From ebc8b83f7b59a41cb7503173eb42ed68cae13805 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 28 Jan 2021 14:30:27 +0100 Subject: [PATCH] facts: always set `container_binary` on monitors wip Signed-off-by: Guillaume Abrioux --- roles/ceph-facts/tasks/container_binary.yml | 7 ++++++- roles/ceph-osd/tasks/common.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) 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 }