- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# hcloud_rdns – Create and manage reverse DNS entries on the Hetzner Cloud

New in version 2.9.

- Synopsis
- Requirements
- Parameters
- See Also
- Examples
- Return Values
- Status

## Synopsis

- Create, update and delete reverse DNS entries on the Hetzner Cloud.

## Requirements

The below requirements are needed on the host that executes this module.

- hcloud-python >= 1.0.0
- hcloud-python >= 1.3.0

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
api_token string / required |  | This is the API Token for the Hetzner Cloud.
dns_ptr string |  | The DNS address the ip_address should resolve to. Omit the param to reset the reverse DNS entry to the default value.
endpoint string | Default: "https://api.hetzner.cloud/v1" | This is the API Endpoint for the Hetzner Cloud.
ip_address string / required |  | The IP address that should point to dns_ptr.
server string / required |  | The name of the Hetzner Cloud server you want to add the reverse DNS entry to.
state string | Choices: absent present ← | State of the reverse DNS entry.

## See Also

See also

Documentation for Hetzner Cloud API
  Complete reference for the Hetzner Cloud API.

## Examples

    - name: Create a reverse DNS entry for a server
      hcloud_rdns:
        server: my-server
        ip_address: 123.123.123.123
        dns_ptr: example.com
        state: present

    - name: Ensure the reverse DNS entry is absent (remove if needed)
      hcloud_rdns:
        server: my-server
        ip_address: 123.123.123.123
        dns_ptr: example.com
        state: absent

## Return Values

Common return values are documented here, the following are the fields unique to this module:

Key | Returned | Description
--- | --- | ---
hcloud_rdns complex | always | The reverse DNS entry
| dns_ptr string | always | The DNS that resolves to the IP Sample: example.com
| ip_address string | always | The IP address that point to the DNS ptr Sample: 123.123.123.123
| server string | always | Name of the server Sample: my-server

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]

### Authors

- Lukas Kaemmerling (@lkaemmerling)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.