{vars,facts}/upload: fix ipv6 support

This commit is contained in:
Jörg Thalheim
2024-10-10 16:52:42 +02:00
parent 973aef72d3
commit 420958f19d
3 changed files with 9 additions and 2 deletions

View File

@@ -218,6 +218,13 @@ class Host:
def target(self) -> str:
return f"{self.user or 'root'}@{self.host}"
@property
def target_for_rsync(self) -> str:
host = self.host
if ":" in host:
host = f"[{host}]"
return f"{self.user or 'root'}@{host}"
def _prefix_output(
self,
displayed_cmd: str,