diff --git a/changelogs/fragments/ansible-test-target-options.yml b/changelogs/fragments/ansible-test-target-options.yml new file mode 100644 index 00000000000..716a5dca419 --- /dev/null +++ b/changelogs/fragments/ansible-test-target-options.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test - Prevent ``--target-`` prefixed options for the ``shell`` command from being combined with legacy environment options. diff --git a/test/lib/ansible_test/_internal/cli/compat.py b/test/lib/ansible_test/_internal/cli/compat.py index 778e2fc0dcb..0a23c2306f3 100644 --- a/test/lib/ansible_test/_internal/cli/compat.py +++ b/test/lib/ansible_test/_internal/cli/compat.py @@ -202,6 +202,9 @@ def convert_legacy_args( '--controller', '--target', '--target-python', + '--target-posix', + '--target-windows', + '--target-network', ] used_old_options = old_options.get_options_used()