ngine_io / ngine_io.cloudstack / 2.3.0 / module / cs_physical_network Manages physical networks on Apache CloudStack based clouds. | "added in version" 0.1.0 of ngine_io.cloudstack" Authors: Netservers Ltd. (@netservers), Patryk Cichy (@PatTheSilent)ngine_io.cloudstack.cs_physical_network (2.3.0) — module
Install with ansible-galaxy collection install ngine_io.cloudstack:==2.3.0
collections: - name: ngine_io.cloudstack version: 2.3.0
Create, update and remove networks.
Enabled and disabled Network Service Providers
Enables Internal LoadBalancer and VPC/VirtualRouter elements as required
- 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
name: aliases: - physical_network description: - Name of the physical network. required: true type: str tags: aliases: - tag description: - A tag to identify this network. - Physical networks support only one tag. - To remove an existing tag pass an empty string. type: str vlan: description: - The VLAN/VNI Ranges of the physical network. type: str zone: description: - Name of the zone in which the network belongs. required: true type: str state: choices: - present - absent - disabled - enabled default: present description: - State of the physical network. type: str domain: description: - Domain the network is owned by. type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. required: true type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. required: true type: str api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str poll_async: default: true description: - Poll async jobs until job has finished. type: bool api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int nsps_enabled: description: - List of Network Service Providers to enable. elements: str type: list network_speed: choices: - 1G - 10G description: - The speed for the physical network. type: str nsps_disabled: description: - List of Network Service Providers to disable. elements: str type: list api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. type: str isolation_method: choices: - VLAN - VXLAN - GRE - L3 description: - Isolation method for the physical network. type: str api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str broadcast_domain_range: choices: - POD - ZONE description: - broadcast domain range for the physical network[Pod or Zone]. type: str
broadcast_domain_range: description: broadcastdomainrange of the network [POD / ZONE]. returned: success sample: ZONE type: str domain: description: Name of domain the network is in. returned: success sample: domain1 type: str id: description: UUID of the network. returned: success sample: 3f8f25cd-c498-443f-9058-438cfbcbff50 type: str isolation_method: description: isolationmethod of the network [VLAN/VXLAN/GRE/L3]. returned: success sample: VLAN type: str name: description: Name of the network. returned: success sample: net01 type: str network_speed: description: networkspeed of the network [1G/10G]. returned: success sample: 1G type: str nsps: contains: disabled: description: list of Network Service Providers that were disabled returned: on Network Service Provider disabling sample: - internallbvm type: list enabled: description: list of Network Service Providers that were enabled returned: on Network Service Provider enabling sample: - virtualrouter type: list description: list of enabled or disabled Network Service Providers returned: on enabling/disabling of Network Service Providers type: complex state: description: State of the network [Enabled/Disabled]. returned: success sample: Enabled type: str zone: description: Name of zone the physical network is in. returned: success sample: ch-gva-2 type: str