mnecas / mnecas.ovirt / 1.5.5 / module / ovirt_network Module to manage logical networks in oVirt/RHV | "added in version" 1.0.0 of mnecas.ovirt" Authors: Ondra Machacek (@machacekondra), Martin Necas (@mnecas)mnecas.ovirt.ovirt_network (1.5.5) — module
Install with ansible-galaxy collection install mnecas.ovirt:==1.5.5
collections: - name: mnecas.ovirt version: 1.5.5
Module to manage logical networks in oVirt/RHV
# Examples don't contain auth parameter for simplicity, # look at ovirt_auth module to see how to reuse authentication: # Create network - mnecas.ovirt.ovirt_network: data_center: mydatacenter name: mynetwork vlan_tag: 10 vm_network: true
# Remove network - mnecas.ovirt.ovirt_network: state: absent name: mynetwork
# Change Network Name - mnecas.ovirt.ovirt_network: id: 00000000-0000-0000-0000-000000000000 name: "new_network_name" data_center: mydatacenter
# Add network from external provider - mnecas.ovirt.ovirt_network: data_center: mydatacenter name: mynetwork external_provider: ovirt-provider-ovn
# Remove vlan_tag - mnecas.ovirt.ovirt_network: data_center: mydatacenter name: mynetwork vlan_tag: -1
id: description: - ID of the network to manage. type: str mtu: description: - Maximum transmission unit (MTU) of the network. type: int auth: description: - 'Dictionary with values needed to create HTTP/HTTPS connection to oVirt:' required: true suboptions: ca_file: description: - A PEM file containing the trusted CA certificates. - The certificate presented by the server will be verified using these CA certificates. - If C(ca_file) parameter is not set, system wide CA certificate store is used. - Default value is set by C(OVIRT_CAFILE) environment variable. type: str compress: default: true description: Flag indicating if compression is used for connection. type: bool headers: description: - Dictionary of HTTP headers to be added to each API call. type: dict hostname: description: - A string containing the hostname of the server, usually something like `I(server.example.com)`. - Default value is set by C(OVIRT_HOSTNAME) environment variable. - Either C(url) or C(hostname) is required. type: str insecure: default: false description: - A boolean flag that indicates if the server TLS certificate and host name should be checked. type: bool kerberos: description: - A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication. type: bool password: description: - The password of the user. - Default value is set by C(OVIRT_PASSWORD) environment variable. required: true type: str timeout: description: Number of seconds to wait for response. type: int token: description: - Token to be used instead of login with username/password. - Default value is set by C(OVIRT_TOKEN) environment variable. type: str url: description: - A string containing the API URL of the server, usually something like `I(https://server.example.com/ovirt-engine/api)`. - Default value is set by C(OVIRT_URL) environment variable. - Either C(url) or C(hostname) is required. type: str username: description: - The name of the user, something like I(admin@internal). - Default value is set by C(OVIRT_USERNAME) environment variable. required: true type: str type: dict name: description: - Name of the network to manage. required: true type: str wait: default: true description: - C(yes) if the module should wait for the entity to get into desired state. type: bool label: description: - Name of the label to assign to the network. type: str state: choices: - present - absent default: present description: - Should the network be present or absent type: str comment: description: - Comment of the network. type: str timeout: default: 180 description: - The amount of time in seconds the module should wait for the instance to get into desired state. type: int clusters: description: - List of dictionaries describing how the network is managed in specific cluster. elements: dict suboptions: assigned: description: - I(true) if the network should be assigned to cluster. Default is I(true). type: bool display: description: - I(true) if the network should marked as display network. type: bool gluster: description: - I(true) if the network should marked as gluster network. type: bool migration: description: - I(true) if the network should marked as migration network. type: bool name: description: - Cluster name. required: description: - I(true) if the network must remain operational for all hosts associated with this network. type: bool type: list vlan_tag: description: - Specify VLAN tag. - NOTE - To remove the vlan_tag use -1. type: int vm_network: description: - If I(True) network will be marked as network for VM. - VM network carries traffic relevant to the virtual machine. type: bool data_center: description: - Datacenter name where network reside. required: true type: str description: description: - Description of the network. type: str fetch_nested: default: false description: - If I(True) the module will fetch additional data from the API. - It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other attributes of the nested entities by specifying C(nested_attributes). type: bool poll_interval: default: 3 description: - Number of the seconds the module waits until another poll request on entity status is sent. type: int external_provider: description: - Name of external network provider. - At first it tries to import the network when not found it will create network in external provider. type: str nested_attributes: description: - Specifies list of the attributes which should be fetched from the API. - This parameter apply only when C(fetch_nested) is I(true). elements: str type: list
id: description: ID of the managed network returned: On success if network is found. sample: 7de90f31-222c-436c-a1ca-7e655bd5b60c type: str network: description: 'Dictionary of all the network attributes. Network attributes can be found on your oVirt/RHV instance at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/network.' returned: On success if network is found. type: dict