ipa_dnsrecord - Manage FreeIPA DNS records

New in version 2.4.

Synopsis

  • Add, modify and delete an IPA DNS Record using IPA API

Options

parameter required default choices comments
ipa_host
no ipa.example.com
IP or hostname of IPA server
ipa_pass
yes
Password of administrative user
ipa_port
no 443
Port of IPA server
ipa_prot
no https
  • http
  • https
Protocol used by IPA server
ipa_user
no admin
Administrative account used on IPA server
record_name
yes
The DNS record name to manage.
aliases: name
record_type
no A
  • A
  • AAAA
  • PTR
The type of DNS record name
Currently, 'A', 'AAAA', and 'PTR' are supported
record_value
yes
Manage DNS record name with this value.
In the case of 'A' or 'AAAA' record types, this will be the IP address.
In the case of 'PTR' record type, this will be the hostname.
state
no present
  • present
  • absent
State to ensure
validate_certs
no True
This only applies if ipa_prot is https.
If set to no, the SSL certificates will not be validated.
This should only set to no used on personally controlled sites using self-signed certificates.
zone_name
yes
The DNS zone name to which DNS record needs to be managed.

Examples

# Ensure dns record is present
- ipa_dnsrecord:
    ipa_host: spider.example.com
    ipa_pass: Passw0rd!
    state: present
    zone_name: example.com
    record_name: vm-001
    record_type: 'AAAA'
    record_value: '::1'

# Ensure a PTR record is present
- ipa_dnsrecord:
    ipa_host: spider.example.com
    ipa_pass: Passw0rd!
    state: present
    zone_name: 2.168.192.in-addr.arpa
    record_name: 5
    record_type: 'PTR'
    record_value: 'internal.ipa.example.com'

# Ensure that dns record is removed
- ipa_dnsrecord:
    name: host01
    zone_name: example.com
    record_type: 'AAAA'
    record_value: '::1'
    ipa_host: ipa.example.com
    ipa_user: admin
    ipa_pass: topsecret
    state: absent

Return Values

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

name description returned type sample
dnsrecord
DNS record as returned by IPA API.
always dict

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/ipa_dnsrecord_module.html