Gather hypervisor facts in parallel pre-scheduling

This commit is contained in:
Will Miller
2018-08-28 12:25:31 +00:00
parent 3bd8e05732
commit 1c2d1e5d9a
2 changed files with 4 additions and 7 deletions

View File

@@ -18,6 +18,10 @@
group: "{{ libvirt_pool_group }}"
libvirt_host_require_vt: "{{ libvirt_require_vt }}"
# Ensure we have facts about all hypervisors before scheduling begins.
- hosts: hypervisors
gather_facts: true
- hosts: localhost
tasks:
- include_tasks: schedule.yml

View File

@@ -1,11 +1,4 @@
---
# Ensure we have facts about all hypervisors before scheduling begins.
- name: Gather facts from hypervisors
setup:
delegate_to: "{{ item }}"
delegate_facts: true
loop: "{{ groups['hypervisors'] }}"
# Creates a dict mapping each hypervisor's hostname to its hostvars, to be used
# during scheduling.
- name: Collect hypervisor hostvars