tasks.py: fix deploy

This commit is contained in:
zowoq 2024-05-16 15:34:56 +10:00
parent 5dbbe11ded
commit 1a8c37852b

View file

@ -111,17 +111,14 @@ def get_hosts(hosts: str) -> List[DeployHost]:
systems = data["nixosConfigurations"] systems = data["nixosConfigurations"]
return [DeployHost(f"{n}.nix-community.org") for n in systems] return [DeployHost(f"{n}.nix-community.org") for n in systems]
if "darwin01" in hosts: if "darwin" in hosts:
return [ if hosts == "darwin01":
DeployHost(f"{h}.nix-community.org", user="customer") return [DeployHost("darwin01.nix-community.org", user="customer")]
for h in hosts.split(",") else:
] return [
DeployHost(f"{h}.nix-community.org", user="hetzner")
if "darwin02" or "darwin03" in hosts: for h in hosts.split(",")
return [ ]
DeployHost(f"{h}.nix-community.org", user="hetzner")
for h in hosts.split(",")
]
return [DeployHost(f"{h}.nix-community.org") for h in hosts.split(",")] return [DeployHost(f"{h}.nix-community.org") for h in hosts.split(",")]