Alma Linux not recognised as RedHat family

387 views
Skip to first unread message

shane.do...@gmail.com

unread,
Aug 4, 2022, 4:23:05 PM8/4/22
to Ansible Project
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?

Paul Manno

unread,
Aug 4, 2022, 4:28:06 PM8/4/22
to ansible...@googlegroups.com
Have you looked at the full ansible_facts for that OS?  Maybe there is another value you can use other than os_family.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ee6ee5a2-f902-4247-aa9e-e24738742837n%40googlegroups.com.

Matt Martz

unread,
Aug 4, 2022, 4:30:15 PM8/4/22
to ansible...@googlegroups.com
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.

On Thu, Aug 4, 2022 at 3:23 PM shane.do...@gmail.com <shane.do...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ee6ee5a2-f902-4247-aa9e-e24738742837n%40googlegroups.com.


--
Matt Martz
@sivel
sivel.net

shaneoh1980 McP

unread,
Aug 4, 2022, 10:02:49 PM8/4/22
to ansible...@googlegroups.com
Thanks so much - I was able to do this using:

 when: (ansible_distribution == 'AlmaLinux')

And that is working as expected. 

You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/fwcVDez-4DQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAHN57wqHezYiBZ6pos6Z_cphTy9kJ51EpLSVNJ5chmsf0q1o9g%40mail.gmail.com.

Nico Kadel-Garcia

unread,
Aug 6, 2022, 11:11:08 AM8/6/22
to ansible...@googlegroups.com
Uninstall ansible. Install ansible-core, which contains the working
parts of ansible including the ansible commands.

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.

> Is there another way I can get those servers included that anyone knows of?
>
Reply all
Reply to author
Forward
0 new messages