This commit isolates the task setting the fact `is_atomic`.
So we can call ceph-facts with `tasks_from` when we only need this fact.
This avoid having to run the whole role just for this.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
---
-- name: check if it is atomic host
- stat:
- path: /run/ostree-booted
- register: stat_ostree
-
-- name: set_fact is_atomic
- set_fact:
- is_atomic: "{{ stat_ostree.stat.exists }}"
+- name: import_tasks is_atomic.yml
+ import_tasks: is_atomic.yml
- name: import_tasks container_binary.yml
import_tasks: container_binary.yml
--- /dev/null
+---
+- name: check if it is atomic host
+ stat:
+ path: /run/ostree-booted
+ register: stat_ostree
+
+- name: set_fact is_atomic
+ set_fact:
+ is_atomic: "{{ stat_ostree.stat.exists }}"
\ No newline at end of file