rename machine.host to machine.target_host

This commit is contained in:
Jörg Thalheim
2024-02-06 15:55:34 +01:00
parent 7d62e147a9
commit 5e5077c31c
8 changed files with 11 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ def install_nixos(machine: Machine, kexec: str | None = None) -> None:
log.info(f"using secret store: {secrets_module.SecretStore}")
secret_store = secrets_module.SecretStore(machine=machine)
h = machine.host
h = machine.target_host
target_host = f"{h.user or 'root'}@{h.host}"
log.info(f"target host: {target_host}")

View File

@@ -92,7 +92,7 @@ class Machine:
return Path(self.flake_path)
@property
def host(self) -> Host:
def target_host(self) -> Host:
return parse_deployment_address(
self.name, self.target_host_address, meta={"machine": self}
)

View File

@@ -182,7 +182,7 @@ def get_selected_machines(machine_names: list[str], flake_dir: Path) -> HostGrou
hosts = []
for name in machine_names:
machine = Machine(name=name, flake=flake_dir)
hosts.append(machine.host)
hosts.append(machine.target_host)
return HostGroup(hosts)