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

* Always include `name` when applying remote config defaults for Posix/Windows.
pull/86851/head
Matt Davis 1 month ago committed by GitHub
parent c3ea1f9a8f
commit 00b1f27d9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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.

@ -420,6 +420,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:
@ -450,6 +451,7 @@ class WindowsRemoteConfig(RemoteConfig, WindowsConfig):
super().apply_defaults(context, defaults)
self.connection = self.connection or defaults.connection
self.name = defaults.name
@dataclasses.dataclass

Loading…
Cancel
Save