ovirt.engine-setup
oVirt Engine Setup
This role is now part of oVirt Ansible Collection. Please make sure to use the latest version from that source. This repository is now read-only and is not being developed further.
This role installs the necessary packages to set up the oVirt Engine, creates an answer file, and runs the engine-setup process. Optionally, it can also update existing oVirt engine packages.
Important Note
When installing this role from Ansible Galaxy, make sure to run the following command:
$ ansible-galaxy install ovirt.engine-setup
This command will download the role into a directory named ovirt.engine-setup
. Be mindful that the names are case sensitive. For example, if you enter OVIRT.engine-setup
, it will create a directory called OVIRT.engine-setup
, and you’ll always need to refer to it with that capitalization.
For RPM installations, the role can be referenced by three names: oVirt.engine-setup
, ovirt.engine-setup
, and ovirt-engine-setup
. You can use any of these names, but this document will refer to it as ovirt.engine-setup
, as the other two are deprecated.
Target Systems
- engine
Requirements
- A configured environment with the necessary repositories.
- Ansible version 2.9.0 or later.
Role Variables
By default, the engine-setup uses an answer file based on the version of oVirt specified with ovirt_engine_setup_version
. You can provide your own answer file using the variable ovirt_engine_setup_answer_file_path
.
Common Options for the Role:
Name | Default Value | Description |
---|---|---|
ovirt_engine_setup_answer_file_path | UNDEF | Path to a custom answer file for engine-setup . |
ovirt_engine_setup_use_remote_answer_file | False | Set to True to use the answer file on a remote machine. |
ovirt_engine_setup_update_setup_packages | False | Set to True to update packages before setup. |
ovirt_engine_setup_perform_upgrade | False | Set to True to indicate an upgrade process. |
ovirt_engine_setup_product_type | oVirt | Choose between ["oVirt", "RHV"], case insensitive. |
ovirt_engine_setup_offline | False | Set to True to disable all package updates. |
ovirt_engine_setup_restore_engine_cleanup | False | Remove config files and clean the database if a restore file is provided. |
ovirt_engine_setup_restore_file | UNDEF | Restore the engine from a backup file created with engine-backup. |
ovirt_engine_setup_restore_scopes | UNDEF | List of scopes for the restore options. |
ovirt_engine_setup_restore_options | {} | Dictionary to add options for engine restore. |
Common Options for Engine:
Name | Default Value | Description |
---|---|---|
ovirt_engine_setup_version | 4.4 | Supported versions: [4.1, 4.2, 4.3, 4.4]. |
ovirt_engine_setup_package_list | [] | List of additional packages for the engine. |
ovirt_engine_setup_fqdn | UNDEF | Fully qualified DNS name of the server. |
ovirt_engine_setup_organization | UNDEF | Organization name for the certificate. |
ovirt_engine_setup_firewall_manager | firewalld | Type of firewall manager to configure. |
ovirt_engine_setup_require_rollback | UNDEF | Set to True to require rollback capabilities. |
ovirt_engine_setup_admin_password | UNDEF | Password for the administrative user of the Engine. |
ovirt_engine_setup_wait_running_tasks | False | Set to True to wait for running tasks to finish. |
ovirt_engine_cinderlib_enable | False | Set to True to enable cinderlib. |
ovirt_engine_grafana_enable | True | Set to True to enable Grafana integration. |
ovirt_engine_setup_engine_configs | [] | List of configuration options for the engine. |
Engine Database Configuration:
Name | Default Value | Description |
---|---|---|
ovirt_engine_setup_db_host | localhost | Hostname or IP address of the PostgreSQL server. |
ovirt_engine_setup_db_port | 5432 | Port for the Engine database. |
ovirt_engine_setup_db_name | engine | Name of the Engine database. |
ovirt_engine_setup_db_user | engine | User for the Engine database. |
ovirt_engine_setup_db_password | UNDEF | Password for the Engine database. |
ovirt_engine_setup_engine_vacuum_full | False | Perform vacuum on the database before upgrade. |
Data Warehouse Database Configuration:
Name | Default Value | Description |
---|---|---|
ovirt_engine_setup_dwh_db_configure | True | Set to configure the DWH Database manually. |
ovirt_engine_setup_dwh_db_host | localhost | IP address or hostname for DWH database. |
ovirt_engine_setup_dwh_db_port | 5432 | Port for the DWH database. |
ovirt_engine_setup_dwh_db_name | ovirt_engine_history | Name of the DWH database. |
ovirt_engine_setup_dwh_db_user | ovirt_engine_history | User for the DWH database. |
ovirt_engine_setup_dwh_db_password | UNDEF | Password for the DWH database. |
ovirt_engine_setup_dwh_vacuum_full | False | Perform vacuum on the DWH database before an upgrade. |
OVN Configuration:
Name | Default Value | Description |
---|---|---|
ovirt_engine_setup_provider_ovn_configure | True | Set to configure the OVN provider. |
ovirt_engine_setup_provider_ovn_username | admin@internal | Username for OVN access. |
ovirt_engine_setup_provider_ovn_password | UNDEF | Password for OVN access. |
Apache Configuration:
Name | Default Value | Description |
---|---|---|
ovirt_engine_setup_apache_config_root_redirection | True | Configure Apache to redirect to the oVirt ENgine page. |
ovirt_engine_setup_apache_config_ssl | True | Set to configure SSL for Apache automatically. |
Dependencies
None.
Example Playbooks
Here are some example playbooks for setting up oVirt or RHV:
---
# Example of setting up oVirt
- name: Setup oVirt
hosts: engine
vars_files:
- passwords.yml # Contains encrypted admin password
vars:
ovirt_engine_setup_version: '4.2'
ovirt_engine_setup_organization: 'of.ovirt.engine.com'
roles:
- ovirt.engine-setup
# Example of setting up RHV
- name: Setup RHV
hosts: engine
vars_files:
- passwords.yml # Contains encrypted admin password
vars:
ovirt_engine_setup_version: '4.2'
ovirt_engine_setup_organization: 'rhv.redhat.com'
ovirt_engine_setup_product_type: 'rhv'
roles:
- ovirt.engine-setup
# Setting up oVirt with engine configurations
- name: Setup oVirt
hosts: engine
vars_files:
- passwords.yml # Contains encrypted admin password
vars:
ovirt_engine_setup_version: '4.4'
ovirt_engine_setup_organization: 'of.ovirt.engine.com'
ovirt_engine_setup_engine_configs:
- key: SpiceProxyDefault
value: prot://proxy
version: general
roles:
- ovirt.engine-setup
# Restoring oVirt engine from a backup
- name: Restore oVirt engine
hosts: engine
vars_files:
- passwords.yml # Contains encrypted admin password
vars:
ovirt_engine_setup_version: '4.4'
ovirt_engine_setup_organization: 'of.ovirt.engine.com'
ovirt_engine_setup_restore_engine_cleanup: true
ovirt_engine_setup_restore_file: '/path/to/backup.file'
ovirt_engine_setup_restore_scopes:
- 'files'
- 'db'
ovirt_engine_setup_restore_options:
log: '/path/to/file.log'
restore-permissions: ''
provision-all-databases: ''
roles:
- ovirt.engine-setup
ansible-galaxy install ovirt.engine-setup