How to add a callback plugin to a PlaybookExecutor in Ansible 2
How to specify a callback when calling ansible via its API? I have a callback plugin database_write.py for ansible 2.0.0.2 that logs into a database when this is run: ansible-playbook -i inventory.txt playbook.yml # callback is fired ok This works ok because in my $PWD i have ansible.cfg with this line: callback_plugins = ./src/callback Now I'm trying to make ansible to execute my playbook and my callback using the python API. I've basically copied what the ansible-playbook cli tool does # based on https://github.com/ansible/ansible/blob/v2.0.0.2-1/lib/ansible/cli/playbook.py pbex =