1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-16 12:57:40 +00:00
community.general/changelogs
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
..
fragments ini_file: do not delete comment-only lines containing the option name 2026-06-03 23:22:54 +05:30
.gitignore Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
changelog.yaml The next feature release will be 13.1.0. 2026-05-18 20:18:07 +02:00
changelog.yaml.license Make reuse conformant (#5138) 2022-08-21 08:27:01 +02:00
config.yaml Normalize changelog configs. 2025-07-27 16:36:35 +02:00