
This commit adds simple roles to manage: - libvirt service, domains, volumes, networks and pools. - redfish-emulator role installs sushy-tools from pip, together with support packages Please note, that libvirt roles are not meant to be completely idempotent, their main job is deploy temporary resources that for ci and gating purposes, to be tore down afterwards. Roles are specifically made to be simple to debug, and don't contain any complex logic to make them portable, flexible or idempotent. Change-Id: I2ff0138b5c95bea3445e242a2e5061651498f1ab
39 lines
932 B
YAML
39 lines
932 B
YAML
---
|
|
- block:
|
|
- name: Ensuring Libvirt, Qemu and support packages are present
|
|
become: true
|
|
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
|
|
yum:
|
|
name:
|
|
- libguestfs-tools
|
|
- libvirt
|
|
- libvirt-devel
|
|
- libvirt-daemon-kvm
|
|
- qemu-kvm
|
|
- virt-install
|
|
state: present
|
|
- name: Ensuring Libvirt, Qemu and support packages are present
|
|
become: true
|
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
|
apt:
|
|
name:
|
|
- qemu
|
|
- libvirt-bin
|
|
- libguestfs-tools
|
|
- qemu-kvm
|
|
- virtinst
|
|
- python-lxml
|
|
- python3-lxml
|
|
- python3-libvirt
|
|
- python-libvirt
|
|
- dnsmasq
|
|
- ebtables
|
|
state: present
|
|
- name: Start libvirtd
|
|
service:
|
|
name: libvirtd
|
|
state: started
|
|
enabled: true
|
|
become: true
|
|
|