hetzner.hcloud.network_info module – Gather info about your Hetzner Cloud networks.
Note
This module is part of the hetzner.hcloud collection (version 4.2.2).
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
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: hetzner.hcloud.network_info
.
Synopsis
Gather info about your Hetzner Cloud networks.
Aliases: hcloud_network_info
Requirements
The below requirements are needed on the host that executes this module.
python-dateutil >= 2.7.5
requests >=2.20
Parameters
Parameter |
Comments |
---|---|
The API Endpoint for the Hetzner Cloud. You can also set this option by using the Default: |
|
The API Token for the Hetzner Cloud. You can also set this option by using the |
|
The ID of the network you want to get. The module will fail if the provided ID is invalid. |
|
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 |
|
Indicates if the routes from this network should be exposed to the vSwitch connection. Returned: always Sample: |
|
Numeric identifier of the network Returned: always Sample: |
|
IP range of the network Returned: always Sample: |
|
Labels of the network Returned: always |
|
Name of the network Returned: always Sample: |
|
Routes belonging to the network Returned: always |
|
Gateway of this route Returned: always Sample: |
|
Destination network or host of this route. Returned: always Sample: |
|
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: |
|
Name of the datacenter of the server Returned: always Sample: |
|
Numeric identifier of the server Returned: always Sample: |
|
Public IPv4 address of the server, None if not existing Returned: always Sample: |
|
IPv6 network of the server, None if not existing Returned: always Sample: |
|
User-defined labels (key-value pairs) Returned: always |
|
Name of the location of the server Returned: always Sample: |
|
Name of the server Returned: always Sample: |
|
True if rescue mode is enabled, Server will then boot into rescue system on next reboot Returned: always Sample: |
|
Name of the server type of the server Returned: always Sample: |
|
Status of the server Returned: always Sample: |
|
Subnetworks belonging to the network Returned: always |
|
Gateway of this subnetwork Returned: always Sample: |
|
IP range of the subnetwork Returned: always Sample: |
|
Network of the subnetwork. Returned: always Sample: |
|
Type of the subnetwork. Returned: always Sample: |