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

**URL:** <https://forum.ansible.com/t/how-can-i-detect-atomic-version-of-centos-with-ansible-facts-setup-mechanism/24763>\
**Category:** Ansible Project\
**Created:** [June 19, 2017, 4:00pm UTC](https://forum.ansible.com/t/how-can-i-detect-atomic-version-of-centos-with-ansible-facts-setup-mechanism/24763 "2017-06-19T16:00:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephane\_Klein1](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Stephane\_Klein1](https://forum.ansible.com/u/Stephane_Klein1)\
**Post date:** [June 19, 2017, 4:00pm UTC](https://forum.ansible.com/t/how-can-i-detect-atomic-version-of-centos-with-ansible-facts-setup-mechanism/24763/1 "2017-06-19T16:00:59Z")

</div>

Hi,

I have CentOS Atomic Host ([http://www.projectatomic.io/](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

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [June 19, 2017, 4:16pm UTC](https://forum.ansible.com/t/how-can-i-detect-atomic-version-of-centos-with-ansible-facts-setup-mechanism/24763/2 "2017-06-19T16:16:25Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Stephane\_Klein1](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Stephane\_Klein1](https://forum.ansible.com/u/Stephane_Klein1)\
**Post date:** [June 20, 2017, 9:26am UTC](https://forum.ansible.com/t/how-can-i-detect-atomic-version-of-centos-with-ansible-facts-setup-mechanism/24763/3 "2017-06-20T09:26:33Z")

</div>

Thanks

It is possible to override ansible\_os\_family fact?

I try that:

[all]  
[atomic-test-node.example.com](http://atomic-test-node.example.com) ansible\_user=root ansible\_os\_family=atomic

But it don’t work ☹

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [June 20, 2017, 2:46pm UTC](https://forum.ansible.com/t/how-can-i-detect-atomic-version-of-centos-with-ansible-facts-setup-mechanism/24763/4 "2017-06-20T14:46:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Stephane\_Klein](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@Stephane\_Klein](https://forum.ansible.com/u/Stephane_Klein)\
**Post date:** [June 20, 2017, 7:17pm UTC](https://forum.ansible.com/t/how-can-i-detect-atomic-version-of-centos-with-ansible-facts-setup-mechanism/24763/5 "2017-06-20T19:17:08Z")

</div>

This don't override default Ansible facts.
