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/tests/unit/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
..
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 Start opentelemetry spans on host start instead of task start (#11434) 2026-05-17 11:28:15 +02:00
connection Fix incus Windows modules with ansible-core 2.21 (#12163) 2026-06-02 21:04:02 +02:00
filter Sort imports with ruff check --fix (#11400) 2026-01-09 07:40:58 +01:00
inventory replace list(map(...)) with comprehension (#11590) 2026-03-14 08:43:23 +01:00
lookup onepassword* lookups: drop support for op v1 (#12061) 2026-05-18 05:12:14 +02:00
module_utils xenserver_guest_info: add VDI uuid and vdi_type to disk info (#12119) 2026-05-30 19:43:30 +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 Make all doc fragments, module utils, and plugin utils private (#11896) 2026-04-20 20:16:26 +02:00