--- - name: show local facts hosts: servera.lab.example.com tasks: - name: show the old way debug: var: ansible_local['customfact']['system_purpose'] - name: show the new way debug: var: ansible_facts['local']['customfact']['system_purpose']