bifrost/playbooks/deploy-dynamic.yaml
Dmitry Tantsur dc57b72767 Fix internal_ip detection in {enroll,deploy}-dynamic
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
2020-09-18 11:50:37 +02:00

16 lines
503 B
YAML

---
- hosts: localhost
name: "Gather facts on localhost"
become: no
gather_facts: yes
- hosts: baremetal
name: "Create configuration drive files and deploy machines from inventory"
become: no
gather_facts: no
roles:
- role: bifrost-configdrives-dynamic
delegate_to: "{{ groups['target'][0] if groups['target'] is defined else 'localhost' }}"
- role: bifrost-deploy-nodes-dynamic
delegate_to: "{{ groups['target'][0] if groups['target'] is defined else 'localhost' }}"