ngine_io.cloudstack.cs_physical_network module – Manages physical networks on Apache CloudStack based clouds.
Note
This module is part of the ngine_io.cloudstack collection (version 2.5.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 ngine_io.cloudstack
. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: ngine_io.cloudstack.cs_physical_network
.
New in ngine_io.cloudstack 0.1.0
Synopsis
- Create, update and remove networks.
- Enabled and disabled Network Service Providers
- Enables Internal LoadBalancer and VPC/VirtualRouter elements as required
Requirements
The below requirements are needed on the host that executes this module.
- python >= 2.6
- cs >= 0.9.0
Parameters
Parameter | Comments |
---|---|
api_http_method string | HTTP method used to query the API endpoint. If not given, the Choices:
|
api_key string / required | API key of the CloudStack API. If not given, the |
api_secret string / required | Secret key of the CloudStack API. If not set, the |
api_timeout integer | HTTP timeout in seconds. If not given, the Default: |
api_url string / required | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the |
api_verify_ssl_cert string | Verify CA authority cert file. If not given, the |
broadcast_domain_range string | broadcast domain range for the physical network[Pod or Zone]. Choices:
|
domain string | Domain the network is owned by. |
isolation_method string | Isolation method for the physical network. Choices:
|
name aliases: physical_network string / required | Name of the physical network. |
network_speed string | The speed for the physical network. Choices:
|
nsps_disabled list / elements=string | List of Network Service Providers to disable. |
nsps_enabled list / elements=string | List of Network Service Providers to enable. |
poll_async boolean | Poll async jobs until job has finished. Choices:
|
state string | State of the physical network. Choices:
|
tags aliases: tag string | A tag to identify this network. Physical networks support only one tag. To remove an existing tag pass an empty string. |
validate_certs boolean added in ngine_io.cloudstack 2.4.0 | If If not given, the This should only be used on personally controlled sites using self-signed certificates. Choices:
|
vlan string | The VLAN/VNI Ranges of the physical network. |
zone string / required | Name of the zone in which the network belongs. |
Notes
Note
- A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
- This module supports check mode.
Examples
- name: Ensure a network is present ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 isolation_method: VLAN broadcast_domain_range: ZONE - name: Set a tag on a network ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 tag: overlay - name: Remove tag on a network ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 tag: "" - name: Ensure a network is enabled with specific nsps enabled ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 isolation_method: VLAN vlan: 100-200,300-400 broadcast_domain_range: ZONE state: enabled nsps_enabled: - virtualrouter - internallbvm - vpcvirtualrouter - name: Ensure a network is enabled with VXLAN isolation ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 isolation_method: VXLAN vlan: 42-8192 broadcast_domain_range: ZONE state: enabled - name: Ensure a network is disabled ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 state: disabled - name: Ensure a network is enabled ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 state: enabled - name: Ensure a network is absent ngine_io.cloudstack.cs_physical_network: name: net01 zone: zone01 state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
---|---|
broadcast_domain_range string | broadcastdomainrange of the network [POD / ZONE]. Returned: success Sample: |
domain string | Name of domain the network is in. Returned: success Sample: |
id string | UUID of the network. Returned: success Sample: |
isolation_method string | isolationmethod of the network [VLAN/VXLAN/GRE/L3]. Returned: success Sample: |
name string | Name of the network. Returned: success Sample: |
network_speed string | networkspeed of the network [1G/10G]. Returned: success Sample: |
nsps complex | list of enabled or disabled Network Service Providers Returned: on enabling/disabling of Network Service Providers |
disabled list / elements=string |
list of Network Service Providers that were disabled Returned: on Network Service Provider disabling Sample: |
enabled list / elements=string |
list of Network Service Providers that were enabled Returned: on Network Service Provider enabling Sample: |
state string | State of the network [Enabled/Disabled]. Returned: success Sample: |
zone string | Name of zone the physical network is in. Returned: success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/ngine_io/cloudstack/cs_physical_network_module.html