1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-11 18:45:34 +00:00
community.general/tests
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
..
integration test(integration): explicitly add executable to iso_extract on Fedora (#12162) 2026-06-01 06:23:27 +02:00
sanity iptables_state: clean up code (#12093) 2026-05-25 14:58:55 +02:00
unit ini_file: do not delete comment-only lines containing the option name 2026-06-03 23:22:54 +05:30
utils CI: Replace Ubuntu 22.04 with 26.04 for ansible-core devel (#12052) 2026-05-15 10:08:58 +02:00
.gitignore New module git config info (#7587) 2023-11-29 08:37:50 +01:00
config.yml
galaxy-importer.cfg Zuul third-party-check: disable ansible-doc part of galaxy-importer (#7907) 2024-01-27 15:28:10 +01:00