How can I detect Atomic version of CentOS with Ansible facts (setup) mechanism?

Hi,

I have CentOS Atomic Host (http://www.projectatomic.io/).

When I execute:

ansible -m setup my_atomic_os

I have:

“ansible_os_family”: “RedHat”

I see nowhere that this is a Atomic version of RedHat / CentOS (on Atomic host I can’t install package…).

How can I detect this with facts mechanism?

I need to create an Ansible issue on GitHub about this feature request?

Best regards,
Stéphane

Start with: how would I tell the host is an Atomic host without Ansible?

Then you can combine a command: with a register:clause,
and run set_fact with a when: .

For the effort, I'd just add a custom fact. But without knowing how to tell,
that's tricky :slight_smile:

Thanks

It is possible to override ansible_os_family fact?

I try that:

[all]
atomic-test-node.example.com ansible_user=root ansible_os_family=atomic

But it don’t work :frowning:

20 juin 2017 11:26 “Stéphane Klein” <klein.stephane@gmail.com> a écrit:

This don't override default Ansible facts.