diff options
author | Im0 <github@moe.co.uk> | 2018-03-20 21:39:16 +0100 |
---|---|---|
committer | Matt Martz <matt@sivel.net> | 2018-03-20 21:39:16 +0100 |
commit | 8c4f34974309ff94b2ab34233057ac383c3d80a0 (patch) | |
tree | 597f6c6886e6d89cf2130ab4702b08c914a1a6bb /test/integration/targets/include_import | |
parent | Fix csvfile traceback on Python3 (#37625) (diff) | |
download | ansible-8c4f34974309ff94b2ab34233057ac383c3d80a0.tar.xz ansible-8c4f34974309ff94b2ab34233057ac383c3d80a0.zip |
Test include role with items in name #36372 (#37001)
* Tests for #36372
* Tests for #36372
* Tests for #36372
Diffstat (limited to 'test/integration/targets/include_import')
3 files changed, 9 insertions, 1 deletions
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 79f4a78f0b..2e20a14ced 100644 --- a/test/integration/targets/include_import/role/test_include_role.yml +++ b/test/integration/targets/include_import/role/test_include_role.yml @@ -47,12 +47,18 @@ - name: Test role include with a loop include_role: name: "{{ item }}" - register: loop_test with_items: - role1 - role3 - role2 + - name: Assert that roles run with_items + assert: + that: + - _role1_result.msg == 'In role1' + - _role2_result.msg == 'In role2' + - _role3_result.msg == 'In role3' + - name: Test including a task file from a role include_role: name: role1 diff --git a/test/integration/targets/include_import/roles/role2/tasks/main.yml b/test/integration/targets/include_import/roles/role2/tasks/main.yml index 80d6a81fc3..82934f67cf 100644 --- a/test/integration/targets/include_import/roles/role2/tasks/main.yml +++ b/test/integration/targets/include_import/roles/role2/tasks/main.yml @@ -1,2 +1,3 @@ - debug: msg: In role2 + register: _role2_result diff --git a/test/integration/targets/include_import/roles/role3/tasks/main.yml b/test/integration/targets/include_import/roles/role3/tasks/main.yml index 76608a9b19..bb70dad396 100644 --- a/test/integration/targets/include_import/roles/role3/tasks/main.yml +++ b/test/integration/targets/include_import/roles/role3/tasks/main.yml @@ -1,2 +1,3 @@ - debug: msg: In role3 + register: _role3_result |