示例#1
0
文件: core.py 项目: tav/bolt-python
def multirun(spec, arg):
    """run the command in parallel on the various hosts"""

    env().multirun(
        arg, spec.shell, spec.pty, spec.combine_stderr, spec.dir, spec.format,
        quiet_exit=1
        )
示例#2
0
文件: core.py 项目: tav/bolt-python
def multilocal(spec, arg):
    """run the command in parallel locally for each host"""

    def run_local():
        return local(arg, capture=0, dir=spec.dir, format=spec.format)

    env().multirun(
        run_local, spec.shell, spec.pty, spec.combine_stderr, spec.dir,
        spec.format, quiet_exit=1
        )
示例#3
0
文件: core.py 项目: tav/bolt-python
def multisudo(spec, arg):
    """run the sudoed command in parallel on the various hosts"""

    def run_sudo():
        return sudo(
            arg, spec.shell, spec.pty, spec.combine_stderr, None, spec.dir,
            spec.format
            )

    env().multirun(
        run_sudo, spec.shell, spec.pty, spec.combine_stderr, spec.dir,
        spec.format, quiet_exit=1
        )
示例#4
0
文件: core.py 项目: tav/bolt-python
def info(spec, arg):
    """list the hosts and the current context"""

    print
    print "Context:"
    print
    print "\n".join("   %s" % ctx for ctx in env.ctx)
    print
    print "Hosts:"
    print
    for setting in env().settings:
        print "  ", setting['host_string']
    print