hetzner.hcloud.hcloud_network_info – Gather info about your Hetzner Cloud networks.
Note
This plugin is part of the hetzner.hcloud collection (version 1.6.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 hetzner.hcloud
.
To use it in a playbook, specify: hetzner.hcloud.hcloud_network_info
.
Requirements
The below requirements are needed on the host that executes this module.
hcloud-python >= 1.0.0
Parameters
Parameter |
Comments |
---|---|
This is the API Token for the Hetzner Cloud. |
|
This is the API Endpoint for the Hetzner Cloud. Default: “https://api.hetzner.cloud/v1” |
|
The ID of the network you want to get. |
|
The label selector for the network you want to get. |
|
The name of the network you want to get. |
See Also
See also
- Documentation for Hetzner Cloud API
Complete reference for the Hetzner Cloud API.
Examples
- name: Gather hcloud network info
local_action:
module: hcloud_network_info
- name: Print the gathered info
debug:
var: hcloud_network_info
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The network info as list Returned: always |
|
True if the network is protected for deletion Returned: always |
|
Numeric identifier of the network Returned: always Sample: 1937415 |
|
IP range of the network Returned: always Sample: “10.0.0.0/16” |
|
Labels of the network Returned: always |
|
Name of the network Returned: always Sample: “awesome-network” |
|
Routes belonging to the network Returned: always |
|
Gateway of this route Returned: always Sample: “10.0.0.1” |
|
Destination network or host of this route. Returned: always Sample: “10.0.0.0/16” |
|
Servers attached to the network Returned: always |
|
Time window (UTC) in which the backup will run, or null if the backups are not enabled Returned: always Sample: “22-02” |
|
Name of the datacenter of the server Returned: always Sample: “fsn1-dc14” |
|
Numeric identifier of the server Returned: always Sample: 1937415 |
|
Public IPv4 address of the server Returned: always Sample: “116.203.104.109” |
|
IPv6 network of the server Returned: always Sample: “2a01:4f8:1c1c:c140::/64” |
|
User-defined labels (key-value pairs) Returned: always |
|
Name of the location of the server Returned: always Sample: “fsn1” |
|
Name of the server Returned: always Sample: “my-server” |
|
True if rescue mode is enabled, Server will then boot into rescue system on next reboot Returned: always Sample: false |
|
Name of the server type of the server Returned: always Sample: “cx11” |
|
Status of the server Returned: always Sample: “running” |
|
Subnetworks belonging to the network Returned: always |
|
Gateway of this subnetwork Returned: always Sample: “10.0.0.1” |
|
IP range of the subnetwork Returned: always Sample: “10.0.0.0/24” |
|
Network of the subnetwork. Returned: always Sample: “eu-central” |
|
Type of the subnetwork. Returned: always Sample: “cloud” |
Authors
Christopher Schmitt (@cschmitt-hcloud)