From: Andrew Schoen Date: Tue, 20 Mar 2018 19:13:28 +0000 (-0500) Subject: ceph-defaults: set is_atomic variable X-Git-Tag: v3.0.29~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e87a53ada0131ed93d031db081b23792c1bbfca;p=ceph-ansible.git ceph-defaults: set is_atomic variable 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 (cherry picked from commit 6cffbd5409353fc1ce05b3a4a6246d6ef244e731) --- diff --git a/roles/ceph-defaults/tasks/facts.yml b/roles/ceph-defaults/tasks/facts.yml index ef43cb3e6..0b41a53f2 100644 --- a/roles/ceph-defaults/tasks/facts.yml +++ b/roles/ceph-defaults/tasks/facts.yml @@ -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 }}"