restrict playbook execution from specific directory

Hi,

Is there a way to restrict playbook execution from specific directory?

For example: I don’t want user to execute playbook from home directory and I want to enforce it to be executed from only defined ansible directory

Not an explicit feature, but I can think of a few ways you could do this:
- Have an assert/fail at the start of the playbook that checks
``playbook_dir`` is in the 'allowed paths'.
- Setup selinux/apparmor policies to restrict what files
ansible-playbook can access.
- Add to the check to a custom plugin you always load (callback/connection/?).
- Use a wrapper script or shell alias function that does the check and
then calls the 'real' Ansible CLI.

Thank you Brain.

Any sample wrapper script for callback