I am wondering if there is any recommended approach for passing filename 
paths across roles. 

As an example, take a look at 
https://bitbucket.org/neubyr/ansible-example/src repository. There are two 
roles myapp and webserver. 
 * webserver role configures webserver and accepts custom configuration 
file as an input parameter. It will install config file and do some other 
tasks.
 * myapp role configures application and one of it's step is webserver 
configuration. It will pass webserver configuration file path to the 
webserver role so that it can handle that part.

Both roles are tied together in playbook test.yml. Right now file name 
passed to the webserver role is relative path from the playbook file. Is 
there any way to make this path independent of playbook location and 
reference it using role directory? I've tried using role_path variable in 
role dependencies meta.yml file, but role_path is evaluated after calling 
dependency role so it is not helping either.

Is there any way to provide role directory variable? Or Is there any way to 
pass dependency calling role's path?

- thanks, N

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/53054353-1641-48d6-a3b0-51909dfa897a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to