1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-11 10:35:34 +00:00
community.general/plugins
AsifAd fde6b13a7f
ini_file: do not delete comment-only lines containing the option name
When state=present and exclusive=true, the cleanup loops in do_ini()
treated any line that contained the option name as a match, including
pure documentation comments such as "; output_buffering" that have no
"=" sign. As a result those lines were either rewritten in place or
deleted, even though they are not configuration entries.

Skip lines where match.group(2) is a comment character ("#" or ";") and
match.group(6) is empty (no "=" present). This keeps the existing
behaviour of replacing commented config lines like ";output_buffering = 4096"
when modify_inactive_option=true, while leaving doc comments untouched.

Adds two regression tests covering the exact scenario from the issue and
the simpler commented-config replacement case.

Fixes: https://github.com/ansible-collections/community.general/issues/11919
2026-06-03 23:22:54 +05:30
..
action iptables_state: clean up code (#12093) 2026-05-25 14:58:55 +02:00
become pfexec become plugin: fix broken defaults for illumos/SmartOS (#11623) 2026-04-25 21:12:36 +02:00
cache Sort imports with ruff check --fix (#11400) 2026-01-09 07:40:58 +01:00
callback unixy callback: fix KeyError when task is delegated to host without ansible_host set (#12113) 2026-05-30 20:02:20 +02:00
connection Fix incus Windows modules with ansible-core 2.21 (#12163) 2026-06-02 21:04:02 +02:00
doc_fragments kopia: Add kopia_repository module (#11752) 2026-05-30 13:38:30 +02:00
filter version_sort filter: fix example's description (#12167) 2026-06-02 18:22:05 +02:00
inventory multiple: replace namedtuple with dataclass (#12094) 2026-05-25 15:50:34 +02:00
lookup consul_kv: add empty_value option for null Consul values (#12120) 2026-05-31 20:48:48 +12:00
module_utils redfish_config: fix KeyError: 'ret' when SetManagerNic cannot find a matching NIC (#12124) 2026-06-02 18:25:26 +02:00
modules ini_file: do not delete comment-only lines containing the option name 2026-06-03 23:22:54 +05:30
plugin_utils Lookup plugins: prevent using _terms for positional arguments, and reject positional arguments completely for lookups that don't use them (#12060) 2026-05-17 09:43:21 +02:00
test Make all doc fragments, module utils, and plugin utils private (#11896) 2026-04-20 20:16:26 +02:00