332667b810
Due to an Ansible bug, kayobe fails to provision a seed VM using Ansible 2.6. Accessing hostvars via an intermediate variable causes Ansible not to template the variable. Work around the issue until it's fixed upstream in Ansible. Change-Id: I41771671779b8e624c87b5234cf36d9e791db0cc Story: 2004759 Task: 28868
17 lines
681 B
YAML
17 lines
681 B
YAML
---
|
|
- name: Ensure that the seed VM is deprovisioned
|
|
hosts: seed-hypervisor
|
|
vars:
|
|
seed_host: "{{ groups['seed'][0] }}"
|
|
roles:
|
|
- role: stackhpc.libvirt-vm
|
|
seed_vm_configdrive_volume:
|
|
name: "{{ hostvars[seed_host].seed_vm_name }}-configdrive"
|
|
pool: "{{ hostvars[seed_host].seed_vm_pool }}"
|
|
libvirt_vm_name: "{{ hostvars[seed_host].seed_vm_name }}"
|
|
libvirt_vm_memory_mb: "{{ hostvars[seed_host].seed_vm_memory_mb }}"
|
|
libvirt_vm_vcpus: "{{ hostvars[seed_host].seed_vm_vcpus }}"
|
|
libvirt_vm_volumes: "{{ hostvars[seed_host].seed_vm_volumes + [seed_vm_configdrive_volume] }}"
|
|
libvirt_vm_state: "absent"
|
|
become: True
|