# Alma Linux not recognised as RedHat family

**URL:** <https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949>\
**Category:** Ansible Project\
**Tags:** ubuntu, awx\
**Created:** [August 4, 2022, 8:23pm UTC](https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949 "2022-08-04T20:23:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shane.do](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@shane.do](https://forum.ansible.com/u/shane.do)\
**Post date:** [August 4, 2022, 8:23pm UTC](https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949/1 "2022-08-04T20:23:05Z")

</div>

I’ve got some playbooks that install updates to some servers based on operating system family like so:

- include\_tasks: update-RedHat.yml  
when: (ansible\_os\_family == ‘RedHat’)

- include\_tasks: update-Debian.yml  
when: (ansible\_os\_family == ‘Debian’)

We recently changed a bunch of servers to Alma Linux and this conditional is being skipped due to Alma Linux not being flagged as being in that family.

I’m running AWX 17.1.0 with Ansible 2.9.18 on an Ubuntu 20.04 server. I found some stuff that suggests perhaps this version of ansible won’t recognise the family, but I’m pretty well stuck on how best to upgrade the ansible version. All the information I can find online just produces error rabbit holes and I’d rather avoid major change today if possible.

Is there another way I can get those servers included that anyone knows of?

---

<div class="post-metadata">

**Author:** ![Paul\_Manno](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/paul_manno/32/2804_2.png) [@Paul\_Manno](https://forum.ansible.com/u/Paul_Manno)\
**Post date:** [August 4, 2022, 8:27pm UTC](https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949/2 "2022-08-04T20:27:37Z")

</div>

Have you looked at the full ansible\_facts for that OS? Maybe there is another value you can use other than os\_family.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [August 4, 2022, 8:29pm UTC](https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949/3 "2022-08-04T20:29:23Z")

</div>

Support to detect AlmaLinux as being in the RedHat family was added in 2.9.19

Take note that 2.9 is now end of life. You should consider upgrading to a supported version.

---

<div class="post-metadata">

**Author:** ![shane.do](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@shane.do](https://forum.ansible.com/u/shane.do)\
**Post date:** [August 5, 2022, 2:02am UTC](https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949/4 "2022-08-05T02:02:20Z")

</div>

Thanks so much - I was able to do this using:

when: (ansible\_distribution == ‘AlmaLinux’)

And that is working as expected.

---

<div class="post-metadata">

**Author:** ![Nico\_Kadel-Garcia](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nico_kadel-garcia/32/9998_2.png) [@Nico\_Kadel-Garcia](https://forum.ansible.com/u/Nico_Kadel-Garcia)\
**Post date:** [August 6, 2022, 3:10pm UTC](https://forum.ansible.com/t/alma-linux-not-recognised-as-redhat-family/36949/5 "2022-08-06T15:10:47Z")

</div>

> I've got some playbooks that install updates to some servers based on operating system family like so:
> 
> &nbsp;&nbsp;- include\_tasks: update-RedHat.yml  
> &nbsp;&nbsp;&nbsp;&nbsp;when: (ansible\_os\_family == 'RedHat')
> 
> &nbsp;&nbsp;- include\_tasks: update-Debian.yml  
> &nbsp;&nbsp;&nbsp;&nbsp;when: (ansible\_os\_family == 'Debian')
> 
> We recently changed a bunch of servers to Alma Linux and this conditional is being skipped due to Alma Linux not being flagged as being in that family.
> 
> I'm running AWX 17.1.0 with Ansible 2.9.18 on an Ubuntu 20.04 server. I found some stuff that suggests perhaps this version of ansible won't recognise the family, but I'm pretty well stuck on how best to upgrade the ansible version. All the information I can find online just produces error rabbit holes and I'd rather avoid major change today if possible.

Uninstall ansible. Install ansible-core, which contains the working  
parts of ansible including the ansible commands.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pip3 install --user ansible-core

Ignore the modern "ansible" package unless you really care to blow  
half a Gig or so on 100 distinct ansible galaxy collection modules,  
which are better updated individually.
