--- - name: test hosts: lxc-pihole tasks: - debug: var=ansible_all_ipv4_addresses - debug: var=hostvars[inventory_hostname]['ansible_default_ipv4']['address']