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>
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'
- 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