--- - name: Adding custom facts on node 1 hosts: node1 tasks: - name: Calling custom facts through var argument debug: var: ansible_local - name : using msg argument debug: msg: "{{ ansible_local }}" - name: Calling child variable value of var debug: var: ansible_local.general.basic.age - name: Calling child variable value of msg debug: msg: "{{ ansible_local.general.basic.age }}" ... # We do not use .msg in the dictionary call outin msg argument as we do in var argument # Run the task with name Calling child variable value of msg by using below # msg: "{{ ansible_local.msg.general.basic.age }}" it will give error as msg not fount in dict type