Reputation: 630
I see different ways of checking for the OS. Some use ansible_facts["os_name"]
while others use ansible_os_family
. Is there a preferred one to use?
Upvotes: 0
Views: 1624
Reputation: 12142
... others use
ansible_os_family
. Is there a preferred one to use?
The documentation about Ansible Facts reference only os_family
.
Also Getting full name of the OS using Ansible facts reference only os_family
.
Based on that I would assume there is no such fact like os_name
, can't be used therefore and os_familiy
should be preferred.
Similar Q&A
Upvotes: 1