Add integration tests for include_role using variable for tasks_file (#37742)

* Add tests using a variable in tasks_from field

Related to #32503

* Do not test using hostvars with import_role

hostvars cannot be used with import_role — use include_role instead
pull/37858/head
Sam Doran 7 years ago committed by GitHub
parent c3ab6cb9b1
commit 00068e9fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save