ansible_os_family values

36,973 views
Skip to first unread message

anatoly techtonik

unread,
Dec 6, 2013, 3:46:40 AM12/6/13
to ansible...@googlegroups.com
Hi,

I know ansible_os_family can be "RedHat" or "Debian", where "RedHat" includes Fedora
and "Debian" is for Ubuntu. Where to find the list of all values that "ansible_os_family"
can take? It would be awesome if every value also included most popular examples of
named families.

Serge van Ginderachter

unread,
Dec 6, 2013, 3:58:13 AM12/6/13
to ansible...@googlegroups.com
There's a list in library/system/setup


--
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.
For more options, visit https://groups.google.com/groups/opt_out.

David Karban

unread,
Dec 6, 2013, 3:59:40 AM12/6/13
to ansible...@googlegroups.com
Hi,

personally if I do not found this kind of item in documentation, I`ll look into code :). In this case, setup module.

        OS_FAMILY = dict(
            RedHat = 'RedHat', Fedora = 'RedHat', CentOS = 'RedHat', Scientific = 'RedHat',
            SLC = 'RedHat', Ascendos = 'RedHat', CloudLinux = 'RedHat', PSBM = 'RedHat',
            OracleLinux = 'RedHat', OVS = 'RedHat', OEL = 'RedHat', Amazon = 'RedHat',
            XenServer = 'RedHat', Ubuntu = 'Debian', Debian = 'Debian', SLES = 'Suse',
            SLED = 'Suse', OpenSuSE = 'Suse', SuSE = 'Suse', Gentoo = 'Gentoo',
            Archlinux = 'Archlinux', Mandriva = 'Mandrake', Mandrake = 'Mandrake',
            Solaris = 'Solaris', Nexenta = 'Solaris', OmniOS = 'Solaris', OpenIndiana = 'Solaris',
            SmartOS = 'Solaris', AIX = 'AIX', Alpine = 'Alpine', MacOSX = 'Darwin',
            FreeBSD = 'FreeBSD', HPUX = 'HP-UX'
        )





2013/12/6 anatoly techtonik <tech...@gmail.com>

--
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.
For more options, visit https://groups.google.com/groups/opt_out.



--
David Karban
Specialista na správu linuxových serverů
www.karban.eu

anatoly techtonik

unread,
Dec 6, 2013, 4:21:40 AM12/6/13
to ansible...@googlegroups.com
Thanks everyone for the hints. Just for reference direct link to the sources.

https://github.com/ansible/ansible/blob/devel/library/system/setup#L241

rrrki...@gmail.com

unread,
May 4, 2015, 6:37:04 AM5/4/15
to ansible...@googlegroups.com
How to check for sunos using sparc machines using ansible_os_family ?

Mayur Nagekar

unread,
Apr 5, 2017, 8:08:48 PM4/5/17
to Ansible Project
With ansible 2.4 round the corner, devel branch has it in build/lib/ansible/module_utils/facts.py



On Friday, December 6, 2013 at 2:16:40 PM UTC+5:30, anatoly techtonik wrote:

Noel Verhoeven

unread,
Apr 6, 2017, 5:01:52 AM4/6/17
to Ansible Project
Funny how I have "windows" in my OS_family variable, but it is not member of this dict. Are there 2 separate instances of this in the code, one for linux and one for windows hosts?

Matt Davis

unread,
Apr 6, 2017, 2:23:13 PM4/6/17
to Ansible Project
The Windows setup module is a completely separate thing (written in Powershell)
Message has been deleted

CJ Harries

unread,
Oct 28, 2017, 11:16:30 PM10/28/17
to Ansible Project

For anyone stumbling on this now, the values have been moved to this file (module_utils/facts/system/distribution.py). I’ve run into this thread twice looking for that and should have updated it the first time I found the moved file. Some useful lines:

Aidan Feldman

unread,
Dec 27, 2017, 4:49:13 PM12/27/17
to Ansible Project
Submitted a pull request to document the possible values: https://github.com/ansible/ansible/pull/34263

Arden Shackelford

unread,
Aug 20, 2018, 11:28:57 AM8/20/18
to Ansible Project
You could also reference their documentation.


Contains this kind of information in a different format.


On Saturday, October 28, 2017 at 10:16:30 PM UTC-5, CJ Harries wrote:
Reply all
Reply to author
Forward
0 new messages