anskbile-galaxy install -r requirements/my-play-reqs.yml -p roles/ installs roles in /etc/ansible/roles instead of /path_to_playbooks/roles?

14 views
Skip to first unread message

ZillaYT

unread,
Nov 29, 2017, 9:55:20 AM11/29/17
to Ansible Project
I have the following directory structure. The my-play-reqs.yml file contains the roles that I need for the my-play.yml playbook.
/path_to_playbooks/my-play.yml
/path_to_playbooks/requirements/my-play-reqs.yml

...and I run the following command to install my roles
$ cd/path_to_playbooks
$ ansible
-galaxy install -r requirements/my-play-reqs.yml -p roles/ --force

...and I expect the roles to be installed /path_to_playbooks/roles. However, they're installed in /etc/ansible/roles instead. The /etc/ansible/ansible.cfg file does have this line
roles_path    = /etc/ansible/roles:/usr/share/ansible/roles

...but shouldn't the "-p roles/" option overried that and put the roles in  /path_to_playbooks/roles?

ZillaYT

unread,
Nov 29, 2017, 10:22:00 AM11/29/17
to Ansible Project
The Ansible Galaxy page at least say the "-r" or "--roles-path" option should override the roles_path setting in ansible.cfg
Reply all
Reply to author
Forward
0 new messages