Discussion:
[ansible-project] can i use a ansible.cfg var in a playbook?
Mauro Nigrele
2015-07-26 06:50:13 UTC
Permalink
Hi!
I need to access the *roles_path* var which is configured in my
*~/.ansible.cfg*. I'm using this path because we have a main git repository
with a lot of roles to use in our playbooks, so every developer can
checkout this repo in any locations and with a local playbook we create the
".ansible.cgf" file so ansible can find automatically these roles without
problem.

So, until here all was wonderful but recently i was trying to use this
roles_path in a playbook for share this path with a volume in docker, and i
can't find how to do it. Any idea about this?

Thanks in advance!
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0cd7444a-ffec-4171-8539-632991e65639%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Paul Markham
2015-07-27 03:11:26 UTC
Permalink
Not sure if this helps, but you can specify the roles directory using
environment variable $ANSIBLE_ROLES_PATH. I don't know if you could set
this from within a playbook, though. We set this, and others, from a
wrapper script.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f9ee53af-c05d-46fd-bf5f-f11a57e86dd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mauro Nigrele
2015-07-27 19:27:19 UTC
Permalink
Thanks Paul, i'll try this workaround, but i still thinking that must be a
way to access this vars, since ansible is using it internally.
Post by Paul Markham
Not sure if this helps, but you can specify the roles directory using
environment variable $ANSIBLE_ROLES_PATH. I don't know if you could set
this from within a playbook, though. We set this, and others, from a
wrapper script.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/59a19b24-db96-4c8e-a64b-44e5d51832ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...