]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
validate: fix ntp_daemon_type check in validate
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 13 Feb 2019 13:08:50 +0000 (14:08 +0100)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Thu, 14 Feb 2019 10:34:37 +0000 (10:34 +0000)
is_atomic is defined in ceph-facts or very early in main playbook.

In non containerized deployment, is_atomic is only set in ceph-facts
which is played after ceph-validate.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-validate/tasks/main.yml
site.yml.sample

index 2ca9e6c83a6e5a3ec363191a008f3270fa8d97df..a1a804a2eeaa0543a86317a04ae76698d378b42a 100644 (file)
@@ -41,7 +41,7 @@
   fail:
     msg: installation can't happen on Atomic and ntpd needs to be installed
   when:
-    - is_atomic
+    - is_atomic | default(False)
     - ansible_os_family == 'RedHat'
     - ntp_daemon_type == 'ntpd'
 
index 914e2b2ac6bc691393eb6701f2c5841809bd1fe6..cf7f620387a102040410f6041c7b4a700950eb3d 100644 (file)
         - ansible_distribution == 'Fedora'
         - ansible_distribution_major_version|int >= 23
 
+    - name: check if it is atomic host
+      stat:
+        path: /run/ostree-booted
+      register: stat_ostree
+      tags:
+        - always
+
+    - name: set_fact is_atomic
+      set_fact:
+        is_atomic: '{{ stat_ostree.stat.exists }}'
+      tags:
+        - always
+
   tasks:
     - import_role:
         name: ceph-validate