facts: always set `container_binary` on monitors

wip

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
guits-add-osd-fix
Guillaume Abrioux 2021-01-28 14:30:27 +01:00
parent 71a5e666e3
commit ebc8b83f7b
2 changed files with 7 additions and 2 deletions

View 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' }}"
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, [])) }}"

View 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 }