Ansible loop related issues

后端 未结 1 347
天涯浪人
天涯浪人 2021-01-27 12:46

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:

1条回答
  •  深忆病人
    2021-01-27 13:13

    ansible_eth0 fact may be unknown at the time of your task run.

    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
          ...
    

    0 讨论(0)
提交回复
热议问题