- hosts: all
gather_facts: yes
tasks:
- name: Print all available facts
ansible.builtin.debug:
var: ansible_facts
- name: Print variable value
debug:
msg: "Variable: {{ ansible_fqdn }}"