tasks/reboot: simplify
This commit is contained in:
parent
a38183f184
commit
7f8a838e24
1 changed files with 2 additions and 4 deletions
6
tasks.py
6
tasks.py
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue