mirror of
https://github.com/Rudd-O/ansible-qubes.git
synced 2025-06-06 18:08:31 +02:00
Fix defect in proxy host management
This commit is contained in:
parent
e23fd6b8e2
commit
1f8e70b891
7
bin/qssh
7
bin/qssh
@ -38,11 +38,14 @@ def is_qubes_host(host):
|
||||
return host.endswith(".__qubes__")
|
||||
|
||||
|
||||
def get_vmname_and_management_proxy(host):
|
||||
def get_vmname_and_management_proxy(hostname):
|
||||
host = hostname
|
||||
host = host[:-len(".__qubes__")]
|
||||
if host.endswith("__"):
|
||||
host, proxy, _ = host.rsplit("__", 2)
|
||||
return host, proxy
|
||||
if not host.endswith("."):
|
||||
raise ValueError("invalid proxied host %r" % hostname)
|
||||
return host[:-1], proxy
|
||||
return host, None
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user