ansible/ansible — pull request #4960 by reedobrien (2013-11-19 15:39:40+00:00)
Title: use the current directory as a roles_path fallback

Currently roles_path searches in:

$REPO/playbook/roles/...
$REPO/playbook/[common|main|vars]
config.roles_path

We have a project where we have multiple playbooks sharing roles so we have a structure like this:

$REPO/hosts/production-hosts
$REPO/plays/a-play/[playbook.yaml&&files&&templates]
$REPO/plays/b-play/...
$REPO/plays/...
$REPO/roles/arole/
common
main
templates
vars

We want to set the roles_path dynamically to the top level $REPO directory, but that may be in different locations on different systems. We want to avoid using the $ANSIBLE_ROLES_PATH as using environment variables is considered legacy in favor of using ansible.cfg.

This pull request simply sets the
```get_config()``` default for roles_path to ```os.path.sep.join([os.getcwd(), "roles"])``` to accomplish this goal.

This also brings the roles_path search behavior more into line with ansible.cfg location search behavior: First try a couple default locations, then try the calling () directory.