import subprocess import os import glob def runAnsiblePlaybook(config, key, branch): subprocess.run(['ansible-playbook', config['ansiblemenu'][key]['playbook']], check=True, cwd=config['base_path']) def pullAnsiblePlaybook(config, key, branch): subprocess.run(['ansible-pull', config['ansiblemenu'][key]['playbook']], check=True, cwd=config['base_path'])