hetzner.hcloud.hcloud_subnetwork – Manage cloud subnetworks on the Hetzner Cloud.¶
Note
This plugin is part of the hetzner.hcloud collection (version 1.2.1).
To install it use: ansible-galaxy collection install hetzner.hcloud
.
To use it in a playbook, specify: hetzner.hcloud.hcloud_subnetwork
.
Requirements¶
The below requirements are needed on the host that executes this module.
hcloud-python >= 1.0.0
hcloud-python >= 1.10.0
Parameters¶
See Also¶
See also
- Documentation for Hetzner Cloud API
Complete reference for the Hetzner Cloud API.
Examples¶
- name: Create a basic subnetwork
hcloud_subnetwork:
network: my-network
ip_range: 10.0.0.0/16
network_zone: eu-central
type: cloud
state: present
- name: Create a basic subnetwork
hcloud_subnetwork:
network: my-vswitch-network
ip_range: 10.0.0.0/24
network_zone: eu-central
type: vswitch
vswitch_id: 123
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: cloud
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Lukas Kaemmerling (@lkaemmerling)