linuxinstaller/libreticmenu/AnsibleActions.py

9 lines
365 B
Python

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'])