Thanks Alex! that helped a lot.

On Thursday, October 8, 2020 at 4:14:16 AM UTC-5 [email protected] wrote:

> ansible_os_family is for assigning tasks, variables etc. to a family of 
> operating systems (i.e Debian, RedHat etc)
> Debian will match Debian, Ubuntu, any other derived Debian distribution
> RedHat will match RedHat, CentOS, Fedora, any other derived RedHat 
> distribution
> the assumption is that in the same family the things are the same (i.e. 
> apache is apache2 in Debian family, but httpd in RedHat family)
>
> if you need finer grain you could use  ansible_distribution, which will 
> give you the exact linux distribution
>
> in most cases os_family will be enough, but when it comes to package 
> versions (like php-7.x) maybe you will need 
> also ansible_distribution_major_version
>
> Alex
>
>
> Pe luni, 5 octombrie 2020, la 15:48:48 UTC+3, [email protected] a scris:
>
>> Hello All,
>>
>> I have a general question!
>>
>> When should I use ansible_facts.distribution vs ansible_os_family or are 
>> they interchangeable? Is one better than the other?
>>
>> Thanks,
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2e8ba9e9-3b84-44ca-a318-fcf0fb0de32fn%40googlegroups.com.

Reply via email to