mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 08:43:10 +00:00
This module is mostly written to make room for the option of not setting the `value` parameter while `state=absent`. That choice being a feature, since it allows both for the removal of individual records as well as the removal of full record sets. The opposite goes for the `record` parameter, which needs to be defined at least by its default value for the module to be able to produce any meaningful result. Hence making it explicit as part of required_if. The MX record type is already plenty covered. In addition to the priority parameter having a default value, the `ensure_dns_record` method does its own parameter checking. SRV records on the other hand do need additional parameter checking. Primarily with the `delete_dns_records` method in mind. Fixes #23957