ipadnsrecord: Allow setting any IP address if create_reverse is false

Adding an A/AAAA record to a host fails if there's not a reverse zone
set that the resulting PTR record can be added to, even if
create_reverse is false.

Changing the rule to create the reverse record fixes the issue.

Fixes: #1381

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
This commit is contained in:
Rafael Guterres Jeffman
2025-08-26 09:10:48 -03:00
parent 30b72422d9
commit 355438cea9
6 changed files with 40 additions and 25 deletions

View File

@@ -1545,6 +1545,28 @@
register: result
failed_when: result.changed or result.failed
- name: Ensure host has IP in subnet not managed by IPA, without PTR record
ipadnsrecord:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
zone_name: "{{ testzone }}"
name: host01
a_rec: "{{ external_ipv4_address }}"
a_create_reverse: false
register: result
failed_when: not result.changed or result.failed
- name: Ensure host has IP in subnet not managed by IPA, without PTR record, again
ipadnsrecord:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
zone_name: "{{ testzone }}"
name: host01
a_rec: "{{ external_ipv4_address }}"
a_create_reverse: false
register: result
failed_when: result.changed or result.failed
# cleanup
- name: Cleanup test environment.
ansible.builtin.include_tasks: env_cleanup.yml