c01f5834cb
This command will destroy the seed VM and all associated data volumes.
16 lines
555 B
YAML
16 lines
555 B
YAML
---
|
|
- name: Ensure that the seed VM is deprovisioned
|
|
hosts: seed-hypervisor
|
|
vars:
|
|
seed_host: "{{ groups['seed'][0] }}"
|
|
seed_hostvars: "{{ hostvars[seed_host] }}"
|
|
roles:
|
|
- role: libvirt-vm
|
|
seed_vm_configdrive_volume:
|
|
name: "{{ seed_hostvars.seed_vm_name }}-configdrive"
|
|
pool: "{{ seed_hostvars.seed_vm_pool }}"
|
|
libvirt_vm_name: "{{ seed_hostvars.seed_vm_name }}"
|
|
libvirt_vm_volumes: "{{ seed_hostvars.seed_vm_volumes + [seed_vm_configdrive_volume] }}"
|
|
libvirt_vm_state: "absent"
|
|
become: True
|