I think I found a workaround.
ansible looks for ansible.cfg in the current working directory, before looking in ~/.ansible.cfg or /etc/ansible.cfg
So I can include within the playbook directory:
[defaults]
inventory = ./hosts
roles_path = ../shared/roles
This works as long as the user does:
cd path/to/playbook
ansible-playbook playbook.yml
rather than:
ansible-playbook path/to/playbook/playbook.yml
(However I'd still like to be able to set roles_path within a playbook, this would be a cleaner solution)
Regards,
Brian.