Role dependencies - parent or calling role's path

14 views
Skip to first unread message

knowshan

unread,
Aug 2, 2016, 7:20:41 PM8/2/16
to Ansible Project

Is there any way to pass a parent or calling role's name or file-path to dependencies as variable?

---
dependencies:
  - { role: nginx, config_file: "{{ role_path }}/files/nginx.conf" }


I've tried role_path variable, but it gets interpolated in the dependency role.

If this is not possible, then is there any equivalent to specifying role path in Puppet module equivalent like below - "puppet:///modules/webapp/nginx.conf" . Then Ansible could search for role in role directories configured. Any ideas??

--
Thanks,
Shantanu
Reply all
Reply to author
Forward
0 new messages