Fix ansible-test remote aliases for new-style args (#86844) (#86848)

* Always include `name` when applying remote config defaults for Posix/Windows.

(cherry picked from commit 00b1f27d9c)
This commit is contained in:
Matt Davis
2026-05-07 12:28:16 -05:00
committed by GitHub
parent 43bedee141
commit 9f83864ab6
2 changed files with 5 additions and 0 deletions
@@ -0,0 +1,3 @@
bugfixes:
- ansible-test remote alias - Alias values for ``--controller`` and ``--target`` are properly resolved for ``remote``.
Previously, remote alias values (e.g. ``fedora/latest``) resolved to the correct name only for the legacy ``--remote`` arg, failing with an unknown image error for the newer args.
@@ -383,6 +383,7 @@ class PosixRemoteConfig(RemoteConfig, ControllerHostConfig, PosixConfig):
super().apply_defaults(context, defaults)
self.become = self.become or defaults.become
self.name = defaults.name
@property
def have_root(self) -> bool:
@@ -412,6 +413,7 @@ class WindowsRemoteConfig(RemoteConfig, WindowsConfig):
super().apply_defaults(context, defaults)
self.connection = self.connection or defaults.connection
self.name = defaults.name
@dataclasses.dataclass