become: true
tasks:
- - name: set ceph_docker_registry value if not set
- set_fact:
- ceph_docker_registry: "docker.io"
- when: ceph_docker_registry is not defined
+ - import_role:
+ name: ceph-defaults
+ - import_role:
+ name: ceph-facts
+ tasks_from: container_binary
- name: disable node_exporter service
service:
- alertmanager
tasks:
- - name: set ceph_docker_registry value if not set
- set_fact:
- ceph_docker_registry: "docker.io"
- when: ceph_docker_registry is not defined
+ - import_role:
+ name: ceph-defaults
+ - import_role:
+ name: ceph-facts
+ tasks_from: container_binary
- name: stop services
service:
tasks:
- import_role:
name: ceph-defaults
- - import_role:
- name: ceph-facts
- name: check if it is Atomic host
stat: path=/run/ostree-booted
set_fact:
is_atomic: "{{ stat_ostree.stat.exists }}"
+ - import_role:
+ name: ceph-facts
+ tasks_from: container_binary
+
- name: remove ceph container image
command: "{{ container_binary }} rmi {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
tags:
--- /dev/null
+---
+- name: check if podman binary is present
+ stat:
+ path: /usr/bin/podman
+ register: podman_binary
+
+- 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
set_fact:
is_atomic: "{{ stat_ostree.stat.exists }}"
-- name: check if podman binary is present
- stat:
- path: /usr/bin/podman
- register: podman_binary
+- name: import_tasks container_binary.yml
+ import_tasks: container_binary.yml
- name: set_fact is_podman
set_fact:
is_podman: "{{ podman_binary.stat.exists }}"
-- 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' }}"
-
# In case ansible_python_interpreter is set by the user,
# ansible will not discover python and discovered_interpreter_python
# will not be set