import subprocess def runAnsiblePlaybook(config, key): subprocess.check_call(['ansible-playbook', config['ansiblemenu'][key]['playbook']], cwd=config['base_path']) def pullAnsiblePlaybook(url, playbook): subprocess.check_call(['ansible-pull', '-U', url, playbook])