ansible / ansible.builtin / v2.9.18 / module / cs_physical_network Manages physical networks on Apache CloudStack based clouds. | "added in version" 2.8 of ansible.builtin" Authors: Netservers Ltd. (@netservers), Patryk Cichy (@PatTheSilent) preview | supported by communityansible.builtin.cs_physical_network (v2.9.18) — module
pip
Install with pip install ansible==2.9.18
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 cs_physical_network: name: net01 zone: zone01 isolation_method: VLAN broadcast_domain_range: ZONE delegate_to: localhost
- name: Set a tag on a network cs_physical_network: name: net01 tag: overlay delegate_to: localhost
- name: Remove tag on a network cs_physical_network: name: net01 tag: "" delegate_to: localhost
- name: Ensure a network is enabled with specific nsps enabled 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 delegate_to: localhost
- name: Ensure a network is disabled cs_physical_network: name: net01 zone: zone01 state: disabled delegate_to: localhost
- name: Ensure a network is enabled cs_physical_network: name: net01 zone: zone01 state: enabled delegate_to: localhost
- name: Ensure a network is absent cs_physical_network: name: net01 zone: zone01 state: absent delegate_to: localhost
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. - If not set, default zone is used. 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. 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. 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 - 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/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