The ovirt.ovirt manages all oVirt Ansible modules.
The pypi installation is no longer supported if you want to install all dependencies do it manually or install the collection from RPM and it will be done automatically.
Please note that when installing this collection from Ansible Galaxy you are instructed to run following command:
$ ansible-galaxy collection install ovirt.ovirt- Ansible core version 2.14.0 or higher
- Python SDK version 4.5.0 or higher
- modules:
- ovirt_* - Modules to manage objects in ovirt Engine
- ovirt_*_info - Modules to gather information about objects in ovirt Engine
- roles:
- cluster_upgrade
- engine_setup
- hosted_engine_setup
- image_template
- infra
- repositories
- shutdown_env
- vm_infra
- disaster_recovery
- inventory plugin
---
- name: ovirt ansible collection
hosts: localhost
connection: local
vars_files:
# Contains encrypted `engine_password` varibale using ansible-vault
- passwords.yml
tasks:
- block:
# The use of ovirt.ovirt before ovirt_auth is to check if the collection is correctly loaded
- name: Obtain SSO token with using username/password credentials
ovirt.ovirt.ovirt_auth:
url: https://ovirt.example.com/ovirt-engine/api
username: admin@internal
ca_file: ca.pem
password: "{{ ovirt_password }}"
# Previous task generated I(ovirt_auth) fact, which you can later use
# in different modules as follows:
- ovirt_vm:
auth: "{{ ovirt_auth }}"
state: absent
name: myvm
always:
- name: Always revoke the SSO token
ovirt_auth:
state: absent
ovirt_auth: "{{ ovirt_auth }}"
collections:
- ovirt.ovirtThe linter and sanity tests are run with antsibull-nox. Installation:
pip install antsibull-noxBasic usage:
# List all test sessions
nox --list
# Run only the 'lint' session
nox -e lint- Apache License 2.0
- GNU General Public License 3.0