Skip to content

Commit

Permalink
Test include role with items in name ansible#36372 (ansible#37001)
Browse files Browse the repository at this point in the history
* Tests for ansible#36372

* Tests for ansible#36372

* Tests for ansible#36372
  • Loading branch information
Im0 authored and sivel committed Mar 20, 2018
1 parent 09325b6 commit 8c4f349
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- debug:
msg: In role2
register: _role2_result
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- debug:
msg: In role3
register: _role3_result

0 comments on commit 8c4f349

Please sign in to comment.