@task
def restartall():
    if env.host != env.master_server.public_ip:
        abort("tried to restartall from a non-master server")

    for server in env.bootmachine_servers:
        stop(__getdistro_setenv(server.name))
    time.sleep(5)
    start(__getdistro_setenv(env.master_server.name))
    for server in env.bootmachine_servers:
        if server.name != env.master_server.name:
            start(__getdistro_setenv(server.name))
    env.servername = env.master_server.name
    env.host = server.public_ip
    env.host_string = "{0}:{1}".format(env.master_server.public_ip,
                                       env.master_server.port)
    env.hosts = [env.master_server.public_ip]
    env.port = env.master_server.port
    env.user = env.master_server.user
Prompt the user to save when exiting.
dataset/ETHPy150Open rizumu/bootmachine/bootmachine/contrib/configurators/salt.py/restartall--crossover with--dataset/ETHPy150Open enthought/pyface/examples/tasks/basic/example_task.py/ExampleTask._prompt_on_close