W3cubDocs

/Ansible

community.hrobot.reverse_dns – Set or remove reverse DNS entry for IP

Note

This plugin is part of the community.hrobot collection (version 1.2.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 community.hrobot.

To use it in a playbook, specify: community.hrobot.reverse_dns.

New in version 1.2.0: of community.hrobot

Synopsis

  • Allows to set, update or remove a reverse DNS entry for an IP address.

Parameters

Parameter Choices/Defaults Comments
hetzner_password
string / required
The password for the Robot webservice user.
hetzner_user
string / required
The username for the Robot webservice user.
ip
string / required
The IP address to set or remove a reverse DNS entry for.
state
string
    Choices:
  • present
  • absent
Whether to set or update (present) or delete (absent) the reverse DNS entry for ip.
value
string
The reverse DNS entry for ip.
Required if state=present.

Notes

Note

  • For the main IPv4 address of a server, deleting it actually sets it to a default hostname like static.X.Y.Z.W.clients.your-server.de. This substitution (delete is replaced by changing to this value) is done automatically by the API and results in the module not being idempotent in this case.

Examples

- name: Set reverse DNS entry for 1.2.3.4
  community.hrobot.reverse_dns:
    hetzner_user: foo
    hetzner_password: bar
    ip: 1.2.3.4
    value: foo.example.com

- name: Remove reverse DNS entry for 2a01:f48:111:4221::1
  community.hrobot.reverse_dns:
    hetzner_user: foo
    hetzner_password: bar
    ip: 2a01:f48:111:4221::1
    state: absent

Authors

  • Felix Fontein (@felixfontein)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/hrobot/reverse_dns_module.html