---
+- name: Include ocloud_setup role
+ ansible.builtin.import_role:
+ name: "ocloud_setup"
+ delegate_to: "{{ groups['deployer'][0] }}"
+ run_once: true
+
- name: Include platform role - {{ ocloud_platform }}
ansible.builtin.import_role:
name: "ocloud_platform_okd"
ansible.builtin.import_role:
name: "ocloud_platform_hwmgr"
delegate_to: "{{ groups['deployer'][0] }}"
+ run_once: true
when: ocloud_platform == "okd"
when: item.stat.exists
loop: "{{ ocloud_infra_vm_emulator_stat.results }}"
-- name: Create virtual machine - {{ inventory_hostname }}
+- name: Create virtual machine
community.libvirt.virt:
command: define
xml: '{{ lookup("template", "virt.xml.j2") }}'
when: ocloud_infra_vm_definition.changed
become: true
-- name: Activate virtual machine - {{ inventory_hostname }}
+- name: Activate virtual machine
community.libvirt.virt:
name: "{{ inventory_hostname }}"
state: running