Skip to content

Two small ansible modules to create reverse DNS records for Hetzner virtual servers.

Notifications You must be signed in to change notification settings

crisvp/ansible-hetzner-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Hetzner Reverse DNS

This project includes two small modules to create reverse DNS records for Hetzner virtual servers.

Installation

Clone this repository and copy the modules from library/ to your Ansible project's library directory.

library/hcloud_rdns.py

This module creates reverse DNS records through the Hetzner Cloud API1.

Example usage

    - name: Create reverse DNS record (Hetzner Cloud)
      hcloud_rdns:
        token: MySecretToken
        ip: 192.0.2.23
        ptr: mail.example.com
      delegate_to: localhost

Delegation is not strictly necessary, but it prevents the token from leaving the control system.

Known issues

This does not work for IPv6 addresses that do not already have a reverse DNS record. This may be a limitation in the API.

library/hetzner_rdns.py

This module creates reverse DNS records through the Hetzner Robot Webservice2.

Example usage

    - name: Create reverse DNS record (Hetzner Robot)
      hetzner_rdns:
        user: MyRobotWebserviceUsername
        password: MySecretPassword
        ip: 192.0.2.23
        ptr: mail.example.com
      delegate_to: localhost

As with the hcloud_rdns module, delegation is not required.

Return values

On success, both modules return the full response from the API. See the documentation (Cloud1, Robot2) for more information.

About

Two small ansible modules to create reverse DNS records for Hetzner virtual servers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages