mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-01 12:24:43 +00:00
IPA CLI has an option `name_from_ip` that provide a name for a zone
from the reverse IP address, so that it can be used to, for example,
manage PTR DNS records.
This patch adds a similar attribute to ipadnszone module, where it
will try to find the proper zone name, using DNS resolve, or provide
a sane default, if a the zone name cannot be resolved.
The option `name_from_ip` must be used instead of `name` in playbooks,
and it is a string, and not a list.
A new example playbook was added:
playbooks/dnszone/dnszone-reverse-from-ip.yml
A new test playbook was added:
tests/dnszone/test_dnszone_name_from_ip.yml
11 lines
242 B
YAML
11 lines
242 B
YAML
---
|
|
- name: Playbook to ensure DNS zone exist
|
|
hosts: ipaserver
|
|
become: true
|
|
|
|
tasks:
|
|
- name: Ensure zone exist, finding zone name from IP address.
|
|
ipadnszone:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name_from_ip: 10.1.2.3
|