Ansible fact gathering task failed

Yes it would help those new to ansible to add a note something along the lines of
for “default-ipv4-address” use correct ansible variable taking into account ansible jinja syntax

Thanks for feedback guys, we will update the question accordingly.

This definitely makes the work
On the playbook
gather_facts: true
In the task you need to
block: |
Ansible managed node IP is {{ ansible_default_ipv4.address }}
and the facts.txt and index.html should have this content
image