From f93331410122227f82140c7704023e3f7c4e7a56 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 1 Jun 2022 12:17:25 -0700 Subject: [PATCH] ansible-test - Fix shell target options handling. --- changelogs/fragments/ansible-test-target-options.yml | 2 ++ test/lib/ansible_test/_internal/cli/compat.py | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 changelogs/fragments/ansible-test-target-options.yml 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()