- hosts: localhost
roles:
- one
---
- name: do a thing with another role
include_role:
name: two
vars:
passed_variable:
- stuff: "{{ lookup('template', 'role_one_template.j2') }}"
bla bla bla bla
random bit of stuff
does not matter what
---
- debug:
var: passed_variable
looking for "role_one_template.j2" at "/roles/two/templates/role_one_template.j2"
looking for "role_one_template.j2" at "/roles/two/role_one_template.j2"
looking for "role_one_template.j2" at "/templates/role_one_template.j2"
looking for "role_one_template.j2" at "/role_one_template.j2"
[WARNING]: Unable to find 'role_one_template.j2' in expected paths (use -vvvvv to see paths)
...
...
ERROR! An unhandled exception occurred while templating '{u'stuff': [{{ lookup(\'template\', \'role_one_template.j2\') }}]}'.
Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup plugin 'template'.
Error was a <class 'ansible.errors.AnsibleError'>, original message: the template file role_one_template.j2 could not be found for the lookup
--
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-proje...@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/16d95836-e93b-4e98-828d-9b4f176a0047%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.