ovirt_nic – Module to manage network interfaces of Virtual Machines in oVirt/RHV¶
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
ovirt-engine-sdk-python >= 4.3.0
Parameters¶
Notes¶
Note
In order to use this module you have to install oVirt Python SDK. To ensure it’s installed with correct version you can create the following task: pip: name=ovirt-engine-sdk-python version=4.3.0
Examples¶
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Add NIC to VM
ovirt_nic:
state: present
vm: myvm
name: mynic
interface: e1000
mac_address: 00:1a:4a:16:01:56
profile: ovirtmgmt
network: ovirtmgmt
- name: Plug NIC to VM
ovirt_nic:
state: plugged
vm: myvm
name: mynic
- name: Unplug NIC from VM
ovirt_nic:
state: unplugged
linked: false
vm: myvm
name: mynic
- name: Add NIC to template
ovirt_nic:
auth: "{{ ovirt_auth }}"
state: present
template: my_template
name: nic1
interface: virtio
profile: ovirtmgmt
network: ovirtmgmt
- name: Remove NIC from VM
ovirt_nic:
state: absent
vm: myvm
name: mynic
# Change NIC Name
- ovirt_nic:
id: 00000000-0000-0000-0000-000000000000
name: "new_nic_name"
vm: myvm
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Ondra Machacek (@machacekondra)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.