-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
Right now there are a few instances in the book where I'm using facts like ansible_os_family
and ansible_distribution
.
Instead, I should start using ansible_facts
, like ansible_facts.distribution
(or ansible_facts['distribution']
), as users could have INJECT_FACTS_AS_VARS
set to false
, and if so, none of the examples using specific namespaced magic vars will work.
This change was introduced in Ansible 2.5 (I think), therefore it has been present for a few years and will not cause any backwards compatibility issues with any supported Ansible release.
See related: