hetzner.hcloud.hcloud_route module – Create and delete cloud routes on the Hetzner Cloud.
Note
This module is part of the hetzner.hcloud collection (version 1.16.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
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: hetzner.hcloud.hcloud_route
.
Synopsis
Create, update and delete cloud routes on the Hetzner Cloud.
Requirements
The below requirements are needed on the host that executes this module.
hcloud-python >= 1.3.0
python-dateutil >= 2.7.5
requests >=2.20
Parameters
Parameter |
Comments |
---|---|
This is the API Token for the Hetzner Cloud. You can also set this option by using the environment variable HCLOUD_TOKEN |
|
Destination network or host of this route. |
|
This is the API Endpoint for the Hetzner Cloud. Default: |
|
Gateway for the route. |
|
The name of the Hetzner Cloud Network. |
|
State of the route. Choices:
|
See Also
See also
- Documentation for Hetzner Cloud API
Complete reference for the Hetzner Cloud API.
Examples
- name: Create a basic route
hcloud_route:
network: my-network
destination: 10.100.1.0/24
gateway: 10.0.1.1
state: present
- name: Ensure the route is absent
hcloud_route:
network: my-network
destination: 10.100.1.0/24
gateway: 10.0.1.1
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
One Route of a Network Returned: always |
|
Destination network or host of this route Returned: always Sample: |
|
Gateway of the route Returned: always Sample: |
|
Name of the Network Returned: always Sample: |