Commit 3ef9690c authored by Guillaume Abrioux's avatar Guillaume Abrioux
Browse files

docker2podman: skip some role imports from handler

when running docker-to-podman playbook, there's no need to call
`ceph-config` and `ceph-rgw` from the role `ceph-handler`.
It can even have side effects when coming from a baremetal cluster that
was previously migrated using the switch-to-containers playbook. Indeed
it might complain about missing .target systemd unit since they are
removed during that migration.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1944999

Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 70f19be3)
parent c0c90c67
......@@ -65,6 +65,11 @@
gather_facts: false
become: true
tasks:
- name: set_fact docker2podman and container_binary
set_fact:
docker2podman: True
container_binary: podman
- import_role:
name: ceph-defaults
- import_role:
......@@ -72,11 +77,6 @@
- import_role:
name: ceph-handler
- name: set_fact docker2podman and container_binary
set_fact:
docker2podman: True
container_binary: podman
- name: install podman
package:
name: podman
......
......@@ -6,4 +6,5 @@
- name: set_fact container_binary
set_fact:
container_binary: "{{ 'podman' if (podman_binary.stat.exists and ansible_facts['distribution'] == 'Fedora') or (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] == '8') else 'docker' }}"
\ No newline at end of file
container_binary: "{{ 'podman' if (podman_binary.stat.exists and ansible_facts['distribution'] == 'Fedora') or (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] == '8') else 'docker' }}"
when: not docker2podman | default(false) | bool
\ No newline at end of file
......@@ -51,6 +51,7 @@
- name: rgw multi-instances related tasks
when:
- not docker2podman | default(false) | bool
- inventory_hostname in groups.get(rgw_group_name, [])
- handler_rgw_status | bool
block:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment