mirror of
https://github.com/ansible/ansible.git
synced 2026-08-01 16:19:10 +02:00
Fix ansible-test remote aliases for new-style args (#86844)
* Always include `name` when applying remote config defaults for Posix/Windows.
This commit is contained in:
@@ -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)
|
super().apply_defaults(context, defaults)
|
||||||
|
|
||||||
self.become = self.become or defaults.become
|
self.become = self.become or defaults.become
|
||||||
|
self.name = defaults.name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def have_root(self) -> bool:
|
def have_root(self) -> bool:
|
||||||
@@ -450,6 +451,7 @@ class WindowsRemoteConfig(RemoteConfig, WindowsConfig):
|
|||||||
super().apply_defaults(context, defaults)
|
super().apply_defaults(context, defaults)
|
||||||
|
|
||||||
self.connection = self.connection or defaults.connection
|
self.connection = self.connection or defaults.connection
|
||||||
|
self.name = defaults.name
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
|
|||||||
Reference in New Issue
Block a user