Hi all,
Since upgrading to Ansible 2.0.0.2 the following code has stopped working:
- include: redhat-hosts.yml
when: ansible_os_family == ‘RedHat’
This results in the error:
ERROR! The conditional check ‘ansible_os_family == ‘RedHat’’ failed. The error was: ERROR! error while evaluating conditional (ansible_os_family == ‘RedHat’): ERROR! ‘ansible_os_family’ is undefined
This worked fine in 1.9.x - I can’t find anything in the docs to suggest why this would stop working with the upgrade to v2.x. I did wonder if the name of the fact had changed in v2.x but a quick run of the setup module confirms that the fact is present. I am using the default fact gathering configuration and am not using fact caching.
Anyone have any ideas?
Cheers,
Edd