community.general.one_vnet module – Manages OpenNebula virtual networks
Note
This module is part of the community.general collection (version 10.1.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.one_vnet
.
New in community.general 9.4.0
Synopsis
Manages virtual networks in OpenNebula.
Requirements
The below requirements are needed on the host that executes this module.
pyone
Parameters
Parameter |
Comments |
---|---|
The password or token for XMLRPC authentication. If not specified then the value of the |
|
The ENDPOINT URL of the XMLRPC server. If not specified then the value of the |
|
The name of the user for XMLRPC authentication. If not specified then the value of the |
|
A |
|
Choices:
|
|
A string containing the network template contents. |
|
Whether to validate the TLS/SSL certificates or not. This parameter is ignored if Choices:
|
|
Time to wait for the desired state to be reached before timeout, in seconds. Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: partial Note that check mode always returns |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Make sure the network is present by ID
community.general.one_vnet:
id: 0
state: present
register: result
- name: Make sure the network is present by name
community.general.one_vnet:
name: opennebula-bridge
state: present
register: result
- name: Create a new or update an existing network
community.general.one_vnet:
name: bridge-network
template: |
VN_MAD = "bridge"
BRIDGE = "br0"
BRIDGE_TYPE = "linux"
AR=[
TYPE = "IP4",
IP = 192.0.2.50,
SIZE = "20"
]
DNS = 192.0.2.1
GATEWAY = 192.0.2.1
- name: Delete the network by ID
community.general.one_vnet:
id: 0
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The network’s list of ar_pool. Returned: when Sample: |
|
The network’s permissions. Returned: when Sample: |
|
The network’s group ADMIN permissions. Returned: success Sample: |
|
The network’s group MANAGE permissions. Returned: success Sample: |
|
The network’s group USAGE permissions. Returned: success Sample: |
|
The network’s other users ADMIN permissions Returned: success Sample: |
|
The network’s other users MANAGE permissions. Returned: success Sample: |
|
The network’s other users USAGE permissions. Returned: success Sample: |
|
The network’s owner ADMIN permissions. Returned: success Sample: |
|
The network’s owner MANAGE permissions. Returned: success Sample: |
|
The network’s owner USAGE permissions. Returned: success Sample: |
|
The parsed network template. Returned: when Sample: |
|