tasks/reboot: simplify

This commit is contained in:
Jörg Thalheim 2021-10-24 01:31:40 +02:00
parent a38183f184
commit 7f8a838e24

View file

@ -147,10 +147,8 @@ def reboot(c, hosts=""):
""" """
Reboot hosts. example usage: inv reboot --hosts build01,build02 Reboot hosts. example usage: inv reboot --hosts build01,build02
""" """
deploy_hosts = get_hosts(hosts) for h in get_hosts(hosts):
for h in deploy_hosts: h.run("reboot &")
g = DeployGroup([h])
g.run("reboot &")
print(f"Wait for {h.host} to shutdown", end="") print(f"Wait for {h.host} to shutdown", end="")
sys.stdout.flush() sys.stdout.flush()