diff --git a/test/integration/targets/include_import/role/test_include_role.yml b/test/integration/targets/include_import/role/test_include_role.yml index 2e20a14ced..c0be84c6ba 100644 --- a/test/integration/targets/include_import/role/test_include_role.yml +++ b/test/integration/targets/include_import/role/test_include_role.yml @@ -111,6 +111,18 @@ vars: where_am_i_defined: "{{ test_var }}" + - name: Use a variable in tasks_from field + include_role: + name: role1 + tasks_from: "{{ tasks_file_name }}.yml" + vars: + tasks_file_name: canary3 + + - name: Assert that tasks file was included + assert: + that: + - role1_canary3 == 'r1c3' + ## FIXME This fails with the following error: ## The module {u'include_role': {u'name': u'role1'}} was not found in configured module paths. # - name: Include an entire task diff --git a/test/integration/targets/include_import/roles/role1/tasks/canary3.yml b/test/integration/targets/include_import/roles/role1/tasks/canary3.yml new file mode 100644 index 0000000000..40014e32d1 --- /dev/null +++ b/test/integration/targets/include_import/roles/role1/tasks/canary3.yml @@ -0,0 +1,2 @@ +- set_fact: + role1_canary3: r1c3