]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-defaults: set is_atomic variable
authorAndrew Schoen <aschoen@redhat.com>
Tue, 20 Mar 2018 19:13:28 +0000 (14:13 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 21 Mar 2018 18:16:11 +0000 (19:16 +0100)
This variable is needed for containerized clusters and is required for
the ceph-docker-common role. Typically the is_atomic variable is set in
site-docker.yml.sample though so if ceph-docker-common is used outside
of that playbook it needs set in another way. Moving the creation of
the variable inside this role means playbooks don't need to worry
about setting it.

fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1558252

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/ceph-defaults/tasks/facts.yml

index 498c5fa929541b0086dc8e089e25e0acf4c14871..0f48c9ebd4fd2ae9d44d2677b35aa2ee28021014 100644 (file)
@@ -1,4 +1,13 @@
 ---
+- 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: set_fact monitor_name ansible_hostname
   set_fact:
     monitor_name: "{{ ansible_hostname }}"