ipa_dnsrecord – Manage FreeIPA DNS records¶
New in version 2.4.
Parameters¶
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 that dns record exists with a TTL
- ipa_dnsrecord:
name: host02
zone_name: example.com
record_type: 'AAAA'
record_value: '::1'
record_ttl: 300
ipa_host: ipa.example.com
ipa_pass: topsecret
state: present
# 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 a TXT record is present
- ipa_dnsrecord:
ipa_host: spider.example.com
ipa_pass: Passw0rd!
state: present
zone_name: example.com
record_name: _kerberos
record_type: 'TXT'
record_value: 'EXAMPLE.COM'
# Ensure an SRV record is present
- ipa_dnsrecord:
ipa_host: spider.example.com
ipa_pass: Passw0rd!
state: present
zone_name: example.com
record_name: _kerberos._udp.example.com
record_type: 'SRV'
record_value: '10 50 88 ipa.example.com'
# Ensure an MX record is present
- ipa_dnsrecord:
ipa_host: spider.example.com
ipa_pass: Passw0rd!
state: present
zone_name: example.com
record_name: '@'
record_type: 'MX'
record_value: '1 mailserver.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, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
dnsrecord
dictionary
|
always |
DNS record as returned by IPA API.
|
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Abhijeet Kasurde (@Akasurde)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.