Adding a note to the documentation to highlight that key names in the ansible_local variable are converted into lower case when they are read from the local facts on the host.
@ -480,6 +480,11 @@ And this data can be accessed in a ``template/playbook`` as::
The local namespace prevents any user supplied fact from overriding system facts
The local namespace prevents any user supplied fact from overriding system facts
or variables defined elsewhere in the playbook.
or variables defined elsewhere in the playbook.
..note:: The key part in the key=value pairs will be converted into lowercase inside the ansible_local variable. Using the example above, if the ini file contained ``XYZ=3`` in the ``[general]`` section, then you should expect to access it as: ``{{ ansible_local.preferences.general.xyz }}`` and not ``{{ ansible_local.preferences.general.XYZ }}``. This is because Ansible uses Python's `ConfigParser`_ which passes all option names through the `optionxform`_ method and this method's default implementation converts option names to lower case.