Пример #1
0
def salt_master_cmd(cmd, module='cmd.run', minions=r'\*'):
    "runs the given command on all aws instances. given command must escape double quotes"
    with stack_conn(core.find_master(aws.find_region())):
        sudo("salt %(minions)s %(module)s %(cmd)s --timeout=30" % locals())
Пример #2
0
def aws_update_many_projects(pname_list):
    minions = ' or '.join(map(lambda pname: pname + "-*", pname_list))
    region = aws.find_region()
    with core.stack_conn(core.find_master(region)):
        sudo("salt -C '%s' state.highstate --retcode-passthrough" % minions)
Пример #3
0
def remaster_minions():
    map(remaster_minion, core.active_stack_names(aws.find_region()))
Пример #4
0
def aws_stack_list():
    "returns a list of realized stacks. does not include deleted stacks"
    region = aws.find_region()
    return core.active_stack_names(region)
Пример #5
0
def update_master():
    return bootstrap.update_stack(core.find_master(aws.find_region()))
Пример #6
0
def salt_master_cmd(cmd, module='cmd.run', minions=r'\*'):
    "runs the given command on all aws instances. given command must escape double quotes"
    with stack_conn(core.find_master(aws.find_region())):
        sudo("salt %(minions)s %(module)s %(cmd)s --timeout=30" % locals())
Пример #7
0
def remaster_minions():
    map(remaster_minion, core.active_stack_names(aws.find_region()))
Пример #8
0
def aws_update_many_projects(pname_list):
    minions = ' or '.join(map(lambda pname: pname + "-*", pname_list))
    region = aws.find_region()
    with core.stack_conn(core.find_master(region)):
        sudo("salt -C '%s' state.highstate --retcode-passthrough" % minions)
Пример #9
0
def update_master():
    return bootstrap.update_stack(core.find_master(aws.find_region()))
Пример #10
0
def aws_stack_list():
    "returns a list of realized stacks. does not include deleted stacks"
    region = aws.find_region()
    return core.active_stack_names(region)