I have a playbook which has multiple roles and serial setup so that fist it\'s running on one machine then on the rest of them. In one of the roles I have the following tasks:
ansible_eth0 fact may be unknown at the time of your task run.
ansible_eth0
You may want to add fact gathering play at the very top of your playbook:
- hosts: dbnodes gather_facts: yes tasks: - debug: msg="facts gathering" - hosts: othernodes tasks: - name: getting dbnodes IP addresses ...