--- - name: fact playbook hosts: nodes tasks: - name: gathering ipv4 and ipv6 facts debug: msg: "{{ ansible_default_ipv4.interface }} {{ ansible_default_ipv4.broadcast }} {{ ansible_default_ipv4.address }}" - name: device information hosts: nodes tasks: - name: device information debug: msg: "{{ ansible_device_links.ids.sda[1] }}" - name: Demonstration of var argument hosts: nodes tasks: - debug: var: ansible_date_time.date ... # file name: fact.yml # Demonstration of grepping the desired output from list as well dictionary in 2 plays are there in one playbook