Esempio n. 1
0
def ansible_playbook_from_version(request, inventory, playbook, archive_dir,
                                  version):
    archive_version = create_version_archive(version, archive_dir)
    inventory_path = os.path.abspath(inventory)
    ansible_process = run_ansible_playbook(
        playbook,
        basedir=archive_version,
        env={'ANSIBLE_INVENTORY': inventory_path})
    request.ansible_process = ansible_process
    return ansible_process
Esempio n. 2
0
def ansible_playbook_step(request, inventory, playbook):
    ansible_process = run_ansible_playbook(playbook)
    request.ansible_process = ansible_process
    return ansible_process
Esempio n. 3
0
def redeploy_tag(request, tag):
    ansible_process = run_ansible_playbook("deploy.yml",
                                           skip_tags='always',
                                           tags=tag)
    assert ansible_process.returncode == 0
    return ansible_process