1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-11 10:35:34 +00:00

fix(zypper_repository): stop .repo file content overriding user-specified enabled/autorefresh/gpgcheck

When repo= pointed to a .repo file, values parsed from that file were
overwriting the desired state set from module params, causing enabled: false
to have no effect.

Fixes #8783
This commit is contained in:
Alexei Znamensky 2026-05-10 12:10:30 +12:00
parent 645dd2d448
commit bb6d624451

View file

@ -451,12 +451,6 @@ def main():
# Map additional values, if available
if "name" in repofile_items:
repodata["name"] = repofile_items["name"]
if "enabled" in repofile_items:
repodata["enabled"] = repofile_items["enabled"]
if "autorefresh" in repofile_items:
repodata["autorefresh"] = repofile_items["autorefresh"]
if "gpgcheck" in repofile_items:
repodata["gpgcheck"] = repofile_items["gpgcheck"]
exists, mod, old_repos = repo_exists(module, repodata, overwrite_multiple)