ansible / ansible.builtin / v2.9.25 / module / hcloud_subnetwork Manage cloud subnetworks on the Hetzner Cloud. | "added in version" 2.9 of ansible.builtin" Authors: Lukas Kaemmerling (@lkaemmerling) preview | supported by communityansible.builtin.hcloud_subnetwork (v2.9.25) — module
pip
Install with pip install ansible==2.9.25
Create, update and delete cloud subnetworks on the Hetzner Cloud.
- name: Create a basic subnetwork hcloud_subnetwork: network: my-network ip_range: 10.0.0.0/16 network_zone: eu-central type: server state: present
- name: Ensure the subnetwork is absent (remove if needed) hcloud_subnetwork: network: my-network ip_range: 10.0.0.0/8 network_zone: eu-central type: server state: absent
type: description: - Type of subnetwork. required: true type: str state: choices: - absent - present default: present description: - State of the subnetwork. type: str network: description: - The ID or Name of the Hetzner Cloud Networks. required: true type: str endpoint: default: https://api.hetzner.cloud/v1 description: - This is the API Endpoint for the Hetzner Cloud. type: str ip_range: description: - IP range of the subnetwork. required: true type: str api_token: description: - This is the API Token for the Hetzner Cloud. required: true type: str network_zone: description: - Name of network zone. required: true type: str
hcloud_subnetwork: contains: gateway: description: Gateway of the subnetwork returned: always sample: 10.0.0.1 type: str ip_range: description: IP range of the Network returned: always sample: 10.0.0.0/8 type: str network: description: Name of the Network returned: always sample: my-network type: str network_zone: description: Name of network zone returned: always sample: eu-central type: str type: description: Type of subnetwork returned: always sample: server type: str description: One Subnet of a Network returned: always type: complex