Fix adding A/AAAA records with reverse in compatibility mode.

When adding A or AAAA records using the compatibility mode with
Ansible's community general plugin, the reverse (PTR) record was
added, but the A/AAAA record was not. This patch fixes the behavior.

Fix issue #491
This commit is contained in:
Rafael Guterres Jeffman
2021-01-11 17:09:36 -03:00
parent 17c7872a8b
commit 5537492f7f
2 changed files with 64 additions and 26 deletions

View File

@@ -1350,8 +1350,6 @@ def define_commands_for_present_state(module, zone_name, entry, res_find):
module, zone_name, name, args[record])
_commands.extend(cmds)
del args['%s_extra_create_reverse' % ipv]
if '%s_ip_address' not in args:
del args[record]
for record, fields in _RECORD_PARTS.items():
part_fields = [f for f in fields if f in args]
if part_fields: