ovirt.infra
oVirt Infrastructure
Important Information
This guide relates to the oVirt Ansible Collection
, which you can find here. This repository is now in read-only mode and is no longer being actively developed.
The ovirt.infra
role helps you set up the oVirt infrastructure, which includes creating mac pools, data centers, clusters, networks, hosts, users, and groups.
Where to Run
If you're using this role for user management, it requires the ovirt-aaa-jdbc-tool
, which is on the engine machine. Therefore, you need to run this role on the engine machine.
Installation Note
If you're installing this role from Ansible Galaxy, run the command:
$ ansible-galaxy install ovirt.infra
This will download the role into a directory named ovirt.infra
. Be careful with the case sensitivity; for example, OVIRT.infra
will create a different directory.
For RPM installations, three variations can be used: ovirt.infra
, oVirt.infra
, or ovirt-infra
. However, this documentation will use the ovirt.infra
name primarily.
Requirements
- oVirt Python SDK version 4.3
- Ansible version 2.9
Role Variables
Datacenter Variables
You can configure the datacenter using these variables:
Name | Default Value | Description |
---|---|---|
data_center_name | UNDEF | Name of the data center. |
data_center_description | UNDEF | Description of the data center. |
data_center_local | false | Local or shared data center. |
compatibility_version | UNDEF | Compatibility version for the datacenter. |
data_center_state | present | State of the datacenter (present/absent). |
recursive_cleanup | false | Remove all entities inside DC (only if absent). |
format_storages | false | Format all storages going to be removed (only if DC is absent and recursive cleanup is true). |
MAC Pools
Define MAC pools with this variable:
Name | Default Value | Description |
---|---|---|
mac_pool_name | UNDEF | Name of the MAC pool. |
mac_pool_ranges | UNDEF | List of MAC ranges. |
mac_pool_allow_duplicates | UNDEF | Allow MAC address duplicates in a pool. |
Clusters
Set up clusters using these variables:
Name | Default Value | Description |
---|---|---|
name | UNDEF (Required) | Name of the cluster. |
state | present | Current state of the cluster. |
cpu_type | Intel Conroe Family | Type of CPUs used in the cluster. |
profile | UNDEF | Predefined cluster profile. |
ballooning | UNDEF | Enable memory balloon optimization. |
description | UNDEF | Description of the cluster. |
ksm | UNDEF | Enable Kernel Same-page Merging. |
memory_policy | UNDEF | Memory sharing policies. |
migration_policy | UNDEF | Conditions for virtual machine migration. |
ha_reservation | UNDEF | Enable high availability monitoring. |
(And many more options for detailed cluster configuration. Refer to your documentation for all parameters).
Hosts
To set up hosts, define this variable:
Name | Default Value | Description |
---|---|---|
name | UNDEF (Required) | Host name. |
state | present | Host state (present/absent). |
address | UNDEF | Host's IP address or FQDN. |
password | UNDEF | Root password for the host. |
public_key | UNDEF | Use public key for host authentication. |
cluster | UNDEF (Required) | Cluster to which the host connects. |
Additional Components
You can configure additional components like networks, storages, users, and permissions in a similar manner. Each category has its respective variables for detailed setup.
Example Playbook
Here is an example playbook to set up the oVirt infrastructure:
---
- name: Setup oVirt Infrastructure
hosts: localhost
connection: local
gather_facts: false
vars:
engine_fqdn: ovirt-engine.example.com
engine_user: admin@internal
engine_password: 123456
data_center_name: mydatacenter
hosts:
- name: myhost
address: 1.2.3.4
cluster: default
password: 123456
roles:
- ovirt.infra
License
This project is licensed under the Apache License 2.0.
ansible-galaxy install ovirt.infra