dc57b72767
Gather facts on localhost before running them to learn the IP address of the network_interface, which, in turn, is needed for the default value of ironic_url. Do not try to fetch interface information from target hosts, best case it will fail, worst case - will provide IP information from hosts themselves. Change-Id: Ib884c739457fa6e4d0159441c2ae855af61c55c1
17 lines
514 B
YAML
17 lines
514 B
YAML
---
|
|
- hosts: localhost
|
|
name: "Gather facts on localhost"
|
|
become: no
|
|
gather_facts: yes
|
|
|
|
- hosts: baremetal
|
|
name: "Enroll hardware from inventory into Ironic"
|
|
become: no
|
|
gather_facts: no
|
|
roles:
|
|
- role: ironic-enroll-dynamic
|
|
delegate_to: "{{ groups['target'][0] if groups['target'] is defined else 'localhost' }}"
|
|
- role: ironic-inspect-node
|
|
when: inspect_nodes | default('false') | bool
|
|
delegate_to: "{{ groups['target'][0] if groups['target'] is defined else 'localhost' }}"
|