bifrost/playbooks/deploy-dynamic.yaml

19 lines
637 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' }}"
when:
- deploy_config_drive is undefined
- instance_info is undefined or instance_info.configdrive is undefined
- role: bifrost-deploy-nodes-dynamic
delegate_to: "{{ groups['target'][0] if groups['target'] is defined else 'localhost' }}"