From: Guillaume Abrioux Date: Wed, 13 Feb 2019 13:08:50 +0000 (+0100) Subject: validate: fix ntp_daemon_type check in validate X-Git-Tag: v4.0.0rc1~105 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=500256cdaba80341b9ff4e6e38dbb2744d921197;p=ceph-ansible.git validate: fix ntp_daemon_type check in validate 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 --- diff --git a/roles/ceph-validate/tasks/main.yml b/roles/ceph-validate/tasks/main.yml index 2ca9e6c83..a1a804a2e 100644 --- a/roles/ceph-validate/tasks/main.yml +++ b/roles/ceph-validate/tasks/main.yml @@ -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' diff --git a/site.yml.sample b/site.yml.sample index 914e2b2ac..cf7f62038 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -50,6 +50,19 @@ - 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