airshipctl/roles/libvirt-domain/tasks/domain.yaml
Alexander Hughes d5e28362f2 [#62] Standardize yaml file extensions
Currently we have mixed extensions of .yml and .yaml, this patch is
an effort to standardize all yaml documents as .yaml

Change-Id: I7eb815584de5856bbdac9a828ccad8518e8c1729
2020-02-24 14:50:32 +00:00

28 lines
785 B
YAML

---
- name: Ensure the VM console log directory exists
file:
path: "{{ console_log_path | dirname}}"
state: directory
recurse: true
mode: 0770
become: true
when: "libvirt_domain.console_log_enabled | default(false)"
- name: Validate VM interfaces
include_tasks: check-interface.yaml
vars:
interface: "{{ item }}"
with_items: "{{ libvirt_domain.interfaces }}"
- name: Ensure the VM is defined
virt:
name: "{{ libvirt_domain.name }}"
command: define
xml: "{{ libvirt_domain.xml | default(libvirt_domain_template_default) }}"
- name: Ensure the VM is started at boot
virt:
name: "{{ libvirt_domain.name }}"
autostart: "{{ libvirt_domain.autostart | default(false) }}"
state: "{{ libvirt_domain.state | default('running') }}"