This is an example of how to run Ansible v2 Playbook programatically.
$ cd env
$ ../run.py
PLAY [Test play] ***************************************************************
TASK [Debug task] **************************************************************
ok: [localhost] => {
"msg": "Hello world!"
}
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0
Jiri Tyr
MIT