ansible/changelogs/fragments
Mohammed Saalim K 2f621c95fd
deb822_repository: validate name parameter instead of over-normalizing (#86494)
* deb822_repository: validate name parameter instead of over-normalizing

The deb822_repository module was silently mangling the name parameter by converting to lowercase, replacing underscores with hyphens, and removing other characters. This caused filename collisions where distinct repository names produced identical filenames.

This change validates that the name parameter contains only valid APT sources.list filename characters (a-zA-Z0-9_.-) and preserves the name as-is. Invalid characters now result in a clear error message.

Fixes: #86243

* fix: update install.yml test to use valid name without spaces

* deb822_repository: add backward compatibility for legacy filenames

Check if a file with the old normalized naming convention already exists before using the new naming. If a legacy file exists, reuse that slug to avoid creating duplicate files for the same repository.

This addresses feedback from #86343 to maintain backward compatibility.

* deb822_repository: adopt PR #86343 approach for backward compatibility

Based on maintainer feedback, removed strict validation that hard-failed on invalid characters. Instead:

- Convert spaces to hyphens (backward compatible with existing playbooks)

- Preserve case, underscores, and periods

- Check for legacy-normalized files and reuse them if they exist

This maintains backward compatibility while still avoiding over-normalization.

Addresses feedback from https://github.com/ansible/ansible/pull/86494#discussion_r1975816493

* Replicate PR #86343 structure and fix trailing whitespace

- Created name_handling.yml with exact tests from #86343

- Import name_handling.yml in main.yml

- Removed conflicting tests from test.yml

- Updated changelog to match #86343 format

- Fixed trailing whitespace on line 584 (pep8/pylint fix)

* Apply suggested change: inline name.replace() directly
2026-02-03 16:21:45 +01:00
..
51580-fix-git-checkmode-output-on-invalid-ref.yml Fix git checkmode on invalid ref (#86348) 2026-01-30 13:55:29 -05:00
73457-dnf-install-modules-latest.yml state=latest now installs modules when missing. Fixes #73457 (#86328) 2025-12-15 12:08:59 -06:00
85193-runtime-metadata.yml runtime-metadata sanity test: ignore pre-release and build identifier (#85198) 2025-11-10 09:16:54 -08:00
85254-apt-version-comparison-bugfix.yaml apt: Stop the >= operator from being ignored while installing packages (#85254) 2025-11-04 15:34:08 -08:00
85259-fix-human_to_bytes.yml Fix AnsibleModule.human_to_bytes (#85259) 2025-11-11 11:50:36 -08:00
85498-default-callback-width.yml default callback: make YAML line width configurable (#85498) 2026-01-07 12:55:26 +00:00
85623-fix-pip-check-mode-vcs.yml Fix pip package name resolution in check mode (#85623) 2025-11-14 10:20:50 -08:00
85767-ansible-virtualization-freebsd.yml Feature/improve bhyve guest and host detection (#85767) 2025-11-13 09:18:00 -05:00
85834-fix-copy-in-single-file-directory.yml copy - fix reporting changed=True when a single-file dir is copied with remote_src=False (#85834) 2025-12-15 10:53:35 -05:00
85918-handle-missing-results.yml galaxy: handle missing 'results' key in cached Galaxy API responses. (#85972) 2025-10-21 11:27:24 -04:00
85966-psrp-readtimeout.yml Fix psrp - ReadTimeout exceptions now mark host as unreachable (#85974) 2025-10-15 05:59:00 +10:00
85997-basic-py-deprecations.yml Remove deprecated imports from basic.py (#86065) 2025-10-29 19:53:03 +01:00
86003-remove-deprecated-handle_stats_and_callbacks.yml Removed deprecated handle_stats_and_callbacks param of _load_included_file (#86063) 2025-11-05 13:25:49 -05:00
86079-ansible-test-validate-modules-bad-return-keys.yml ansible-test validate-modules: report bad-return-value-key for return values that cannot be accessed with Jinja's dot notation (#86079) 2025-11-11 09:13:15 -08:00
86128-fix-script-decrypt-docs-mismatch.yml Remove decrypt arg-docs mismatch (#86128) 2025-11-07 10:54:25 -05:00
86147-fix-iptables-extension-handling.yml Fix iptables match extension bug (#86147) 2025-11-11 17:29:10 -05:00
86155-deb822_repository_include_exclude.yaml deb822_repository: add include, exclude parameters (#86171) 2025-12-05 12:21:09 -05:00
86156-dnf-multilib-arch.yml fix package installation when specifying architecture without version. Fixes #86156 (#86219) 2025-12-04 11:14:29 -06:00
86243-deb822-repository-name-validation.yml deb822_repository: validate name parameter instead of over-normalizing (#86494) 2026-02-03 16:21:45 +01:00
86320-schema-validation.yml Fix argument spec for v1 source info schema validation (#86320) 2026-01-09 14:20:54 +00:00
86341-galaxy-list-warn.yml ansible-galaxy - Change error to warning when no paths exist (#86341) 2026-01-07 11:24:30 -05:00
86368-user-freebsd-nonexistent.yml Fix user module to not create /nonexistent on FreeBSD (#86415) 2026-01-16 10:40:58 -08:00
86402-galaxy-fix-metadata-foldername-mismatch.yml Fix ansible-galaxy collection metadata/file system location discrepancy (#86402) 2026-02-02 17:17:36 -05:00
86403-fix-deb822-repository-output.yml Spelling and grammar fixes (#86417) 2026-01-13 11:34:56 -08:00
86473_su_become_local.yml Fix local connection interaction with become plugins (#86473) 2026-02-02 09:02:53 -05:00
add-type-debug-info.yml Align AddType debug info with DISPLAY_TRACEBACKS (#86506) 2026-02-03 04:26:05 +10:00
add-type-warning.yml Remove AddType warning for cleanup (#86029) 2025-10-21 06:35:31 +10:00
ansiballz-wrapper-sitecustomize.yml Fix escaping issue in ansiballz wrapper for sitecustomize (#86236) 2025-11-24 09:33:45 -08:00
ansible-minimum-setuptools.yml Raise min setuptools and remove wheel from build (#86040) 2025-11-04 03:33:31 +00:00
ansible-test-alpine.yml ansible-test - Replace Alpine 3.22 with 3.23 (#86386) 2026-01-07 13:44:58 -08:00
ansible-test-api-endpoint.yml ansible-test - Update the Ansible Core CI endpoint (#86455) 2026-01-23 08:36:20 -08:00
ansible-test-auth-cleanup.yml ansible-test - Remove obsolete remote auth (#86462) 2026-01-26 11:02:53 -08:00
ansible-test-auto-collection-loading.yml ansible-test - Add integration test collection deps (#86437) 2026-01-21 09:40:35 -08:00
ansible-test-containers.yml ansible-test - Update base/default containers (#86087) 2025-10-28 14:01:37 -07:00
ansible-test-docker-hostname.yml Fix docker hostname parsing in ansible-test (#86235) 2025-11-20 15:54:33 -08:00
ansible-test-fedora42-expat.yml ansible-test - Fix expat on Fedora 42 remotes (#86375) 2026-01-05 13:22:37 -08:00
ansible-test-freebsd-15.yml ansible-test - Replace FreeBSD 13.5 with 15.0 (#86385) 2026-01-07 13:45:42 -08:00
ansible-test-integration-coverage.yml ansible-test - Fix integration test code coverage (#86100) 2025-10-29 18:21:53 -07:00
ansible-test-inventory-json.yml Use json for test inventory - ci_complete (#86118) 2025-11-04 13:25:03 +10:00
ansible-test-platforms.yml ansible-test - Replace Fedora 42 with 43 (#86220) 2026-01-07 18:36:04 -08:00
ansible-test-pylint-update.yml ansible-test - Update sanity requirements (#86083) 2025-10-28 09:33:10 -07:00
ansible-test-pylint-urllib2.yml Remove urllib2 pylint check (#86139) 2025-11-06 00:55:32 +00:00
ansible-test-rhel-10.1.yml ansible-test - Replace RHEL 10.0 with 10.1 (#86387) 2026-01-07 15:20:37 -08:00
ansible-test-rhel-dnf-optimization.yml ansible-test - Optimize RHEL DNF configuration (#86396) 2026-01-09 08:35:48 -08:00
ansible-test-sanity-unwanted.yml ansible-test - Expand unwanted pylint check (#86416) 2026-01-14 08:40:46 -08:00
ansible-test-spare-tire.yml ansible-test - Update spare-tire URL (#86477) 2026-01-29 09:53:58 -08:00
ansible_local_nodepr.yml ansible_local should not trigger deprecation (#86234) 2025-12-05 11:35:27 -05:00
auto_legacy.yml interpreter_discovery: removed auto_silent* option (#86006) 2025-10-21 11:35:53 -04:00
basic-py-deprecations.yml basic.py: add proper deprecations (#86064) 2025-11-04 10:19:15 -05:00
basic_shlex_split.yml Handle ValueError in run_command when parsing invalid args(shlex.split) (#85945) 2025-10-27 14:02:22 -07:00
cache_avoid_path_keys.yml sanitize path symbols in inventory_hostname on file cache plugins (#41420) 2025-10-24 14:57:11 -04:00
clearlinux-gentoo-parsing.yml Fixes Parsing for ClearLinux exposed by Gentoo (#86384) 2026-01-12 08:02:39 -08:00
compat_datetime.yml module_utils: remove deprecated compat.datetime APIs (#86018) 2025-10-21 11:43:28 -04:00
config_lookup_fix.yml config lookup, fix 'show_origin' and variables (#85356) 2025-10-20 19:15:00 -04:00
configure_display_skipped_hosts.yml Support configuring callback plugins with --extra-vars (#84661) 2025-11-18 20:04:22 -05:00
copy_directory_mode_remote_src.yml copy: honor directory_mode when specified with remote_src=True (#86184) 2025-11-25 10:14:05 -05:00
ctypes-crypt.yml Spelling and grammar fixes (#86417) 2026-01-13 11:34:56 -08:00
data-loader-more-minimize-type-juggling.yml Update DataLoader to deal almost exclusively in str (#85941) 2025-10-21 11:06:15 -04:00
debug_ansible.yml callback: filter _ansible_ in debug message (#84594) 2026-01-06 16:06:10 -08:00
display_filterdenylist.yml Change 'blacklist' to 'denylist' in lib/utils/display.py (#86304) 2026-01-07 00:21:44 +00:00
dnf_install.yml Spelling and grammar fixes (#86417) 2026-01-13 11:34:56 -08:00
du_size.yml file, stat: return disk_usage_bytes (#85909) 2025-10-24 18:42:58 +00:00
filter_strftime.yml filter: Use datetime.strftime instead of time.strftime (#86261) 2025-12-11 11:01:00 -08:00
first-found-example.yml Fix first_found example (#86224) 2025-11-19 10:16:45 -08:00
fix-adhoc-meta-end_play.yml adhoc, ansible-console - fix traceback for meta end_play tasks (#86294) 2025-12-15 11:33:18 -05:00
fix-windows-lib-env-corruption.yml Fix LIB env var incorrectly set to "System.Collections.DictionaryEntry" (#86436) 2026-01-21 12:29:16 +10:00
generator_use_extra.yml generated inventory plugin, add extra vars option (#85372) 2025-10-24 07:39:07 -04:00
get_url_regex.yml get_url: Fix regex for GNU digest line (#86134) 2025-11-17 15:29:43 -08:00
getent-empty-split-fail-json.yml getent: Handle non-empty split string (#85728) 2025-11-17 15:27:24 -08:00
getuser-exception-handling.yml Fix getuser fallback error handling (#86144) 2025-11-07 01:57:23 +00:00
git_gpg.yml git: removed deprecated gpg_whitelist alias (#86011) 2025-10-21 11:37:42 -04:00
group-priority-warning.yml inventory: Add warning for invalid priority values (#86114) 2025-11-04 10:52:15 -05:00
include_tasks_fail_rescue.yml Fix include_role error consitency and add rescueable option (#86012) 2025-10-20 19:19:11 -04:00
jinja-syntax-error-line-numbers.yml template module - Report syntax error line number (#86101) 2025-11-05 17:11:17 -08:00
make-tmp-path-msg.yml Action make_tmp_path fix error (#86505) 2026-02-03 04:25:21 +10:00
module_defaults-action-plugin-templating.yml Fix module_defaults templating for gather_facts, service, and package actions (#85857) 2026-01-09 14:14:26 -05:00
no-sleep-0.yml Remove sleep 0 Linux kernel bug work-around (#86420) 2026-01-14 12:01:23 -08:00
option_deprecation_help.yml option deprecations show alternatives (#86032) 2025-10-23 12:44:43 -04:00
package_facts.yml package_facts: typecast bytes to string while returning facts (#85939) 2025-10-21 15:46:00 +00:00
remove-safe-eval.yml Remove deprecated safe_eval (#86019) 2025-10-22 12:22:14 -04:00
replace-random-with-secrets.yml replace random with secrets when generating passwords (#85971) 2025-11-20 12:32:32 -05:00
required_get_bin_path.yml Removed parameter 'required' from get_bin_path API (#86009) 2025-10-21 11:37:03 -04:00
slurp_noarmor.yml Spelling and grammar fixes (#86417) 2026-01-13 11:34:56 -08:00
soft-deprecate-six.yml Soft deprecate ansible.module_utils.six (#86048) 2025-10-21 16:20:55 -05:00
sshpass-resource-leak.yml ssh connection: fix sshpass pipe fd leaks (#86141) 2025-12-03 12:48:19 +01:00
task_connection_propagation_redux.yml Fix incorrect propagation of task.connection (#86121) 2025-11-03 21:17:43 +00:00
unarchive.yml unarchive: make timezone aware timestamp (#85799) 2026-01-15 04:13:13 -08:00
v2.21.0-initial-commit.yaml Bump devel to 2.21 (#85992) 2025-10-14 15:35:21 -05:00
varloaderror.yml vars loading, show file name instead of vars in error (#86277) 2025-12-02 15:32:24 -06:00
winrm-kerberos.yml winrm - Add better Kerberos error (#86317) 2025-12-11 11:43:33 +10:00