mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 15:38:53 +00:00
[PR #11694/180da98a backport][stable-12] ipa_dnsrecord: add exclusive parameter for append-without-replace semantics (#11885)
ipa_dnsrecord: add `exclusive` parameter for append-without-replace semantics (#11694)
* ipa_dnsrecord: add solo parameter for append-without-replace semantics
Fixes #682
Adds O(solo) boolean parameter (default true, preserving current
replace behaviour) consistent with other DNS modules such as
community.general.dnsimple. When solo=false, only values not
already present in IPA are added, leaving existing values untouched.
* ipa_dnsrecord: rename solo parameter to exclusive
Rename O(solo) to O(exclusive) following reviewer feedback.
'exclusive' is the established Ansible convention for this semantic
(e.g. community.general.ini_file), while 'solo' implies single-value
DNS records.
* ipa_dnsrecord: fix changelog fragment symbol markup
Use double backticks per RST convention in changelog fragments,
not the O() macro (which is for module docstrings).
* Update plugins/modules/ipa_dnsrecord.py
* ipa_dnsrecord: implement exclusive semantics for state=absent
- exclusive=true + state=absent: remove all existing values of that
record type and name, ignoring the specified record_value(s)
- exclusive=false + state=absent: remove only the specified values
that actually exist in IPA, preserving all others
Also updates the exclusive parameter documentation to cover both
state=present and state=absent behaviour.
---------
(cherry picked from commit 180da98a7c)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
dc79f4a170
commit
fa179e6d0c
2 changed files with 71 additions and 5 deletions
4
changelogs/fragments/682-ipa-dnsrecord-solo.yml
Normal file
4
changelogs/fragments/682-ipa-dnsrecord-solo.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
minor_changes:
|
||||
- ipa_dnsrecord - add ``exclusive`` parameter to allow appending values to existing records
|
||||
without replacing them (https://github.com/ansible-collections/community.general/issues/682,
|
||||
https://github.com/ansible-collections/community.general/pull/11694).
|
||||
Loading…
Add table
Add a link
Reference in a new issue