When I run the following ansible command:
$ ansible-playbook deploy/solo/wifi.yml -i inventories/solo
I got the following error message:
ERROR! the role 'solo/controller/wifi' was not found in /home/peng/git/uavops/deploy/roles:/home/peng/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/peng/git/uavops/deploy
The error appears to be in '/home/peng/git/uavops/deploy/wifi.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
roles:
- solo/controller/wifi
^ here
How did this happen? I invoke the ansible-playbook
under the working directory /home/peng/git/uavops
. Yet ansible-playbook ignores it and try to find the roles in directory /home/peng/git/uavops/deploy
.
How do I tell ansible to locate the right role directory?