Files
Kostiantyn Kalynovskyi 493796b94c Minor role fixes
in this commit we are removing dhcp from the networks, fixing vnc
listen ip addresses, and console log output directories

Change-Id: I61a77baa343720583b1ebfb2e4519803f1f32676
2020-01-27 19:52:05 +00:00

28 lines
784 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.yml
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') }}"