Created
September 25, 2023 08:54
-
-
Save stuartellis/4918da955b0456c0f6671f5d384c32cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ansible_runner | |
def run(): | |
config = { | |
"project_dir": "./assets/project", # source directory | |
"playbook":"self_test.yml", # roles are relative to playbooks: use roles_path for other locations | |
"private_data_dir": "./data", # run-time directory | |
"inventory": ["inventory/localhost.yml"], | |
"suppress_env_files": True, | |
"timeout": 120 # timeout in seconds | |
} | |
runner = ansible_runner.run(**config) | |
if __name__ == "__main__": | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment