Kostiantyn Kalynovskyi d7df2fb571 Moving roles from zuul-airship-roles.
Changes is needed because we can not make dependencies on PRs from
other repositories such as zuul-airship-roles, this would allow more
robust development in the stage we currently are in. When there will
be less activity on gating roles will be moved back to separate repo.

Change-Id: I85c9bdd47b5aaba90df5458b20c90ff5c912c05f
2020-02-12 22:52:17 +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') }}"