コード例 #1
0
def run(conf, stack, verbosity=0, python=None):
    """Generate all needed files, run them and remove them again

    :conf: the launcher configuration to use
    :stack: the stack conf to use
    :verbosity: control the amount of output
    :python: the python executable to use locally
    """
    inventory = apply_template('inventory', python=python)
    playbook = generate(stack, conf)
    return exec_playbook(inventory, playbook, verbosity)
コード例 #2
0
def run(conf, stack, verbosity=0, python=None):
    """Generate all needed files, run them and remove them again

    :conf: the launcher configuration to use
    :stack: the stack conf to use
    :verbosity: control the amount of output
    :python: the python executable to use locally
    """
    inventory = apply_template('inventory', python=python)
    playbook = generate(stack, conf)
    return exec_playbook(inventory, playbook, verbosity)
コード例 #3
0
def run(conf, stack, verbosity=0, python=None):
    """Generate all needed files, run them and remove them again

    :conf: the launcher configuration to use
    :stack: the stack conf to use
    :verbosity: control the amount of output
    :python: the python executable to use locally
    """
    inventory = apply_template('inventory', python=python)
    playbook = generate(stack, conf)

    spawn(ansible_vars.GALAXY_INSTALL, verbosity)
    ansible_return = exec_playbook(inventory, playbook, verbosity)

    if ansible_return == 0:
        spawn(ansible_vars.GALAXY_REMOVE, verbosity)
        spawn(["rmdir", "roles"], 0)

    return ansible_return
コード例 #4
0
def run(conf, stack, verbosity=0, python=None):
    """Generate all needed files, run them and remove them again

    :conf: the launcher configuration to use
    :stack: the stack conf to use
    :verbosity: control the amount of output
    :python: the python executable to use locally
    """
    inventory = apply_template('inventory', python=python)
    playbook = generate(stack, conf)

    spawn(ansible_vars.GALAXY_INSTALL, verbosity)
    ansible_return = exec_playbook(inventory, playbook, verbosity)

    if ansible_return == 0:
        spawn(ansible_vars.GALAXY_REMOVE, verbosity)
        spawn(["rmdir", "roles"], 0)

    return ansible_return