summaryrefslogtreecommitdiff
path: root/test/integration/targets/includes
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2017-11-27 17:02:47 +0100
committerjctanner <tanner.jc@gmail.com>2017-11-27 11:02:47 -0500
commit3a2a1e054f983197546d11510a1c7eee1d21d134 (patch)
tree78f7bb76abc5248f23fb899cbd4f8a8f0a87b60f /test/integration/targets/includes
parente65ef09aa9a5a134fb8c2404db9247837dd1dc30 (diff)
downloadansible-3a2a1e054f983197546d11510a1c7eee1d21d134.tar.gz
Fix include in loop when stategy=free (#33094)
Diffstat (limited to 'test/integration/targets/includes')
-rw-r--r--test/integration/targets/includes/roles/test_includes_free/tasks/inner.yml2
-rw-r--r--test/integration/targets/includes/roles/test_includes_free/tasks/main.yml6
-rw-r--r--test/integration/targets/includes/test_include_free.yml9
-rw-r--r--test/integration/targets/includes/test_includes.yml2
4 files changed, 19 insertions, 0 deletions
diff --git a/test/integration/targets/includes/roles/test_includes_free/tasks/inner.yml b/test/integration/targets/includes/roles/test_includes_free/tasks/inner.yml
new file mode 100644
index 0000000000..d9c32f4f3d
--- /dev/null
+++ b/test/integration/targets/includes/roles/test_includes_free/tasks/inner.yml
@@ -0,0 +1,2 @@
+- set_fact:
+ inner: "reached"
diff --git a/test/integration/targets/includes/roles/test_includes_free/tasks/main.yml b/test/integration/targets/includes/roles/test_includes_free/tasks/main.yml
new file mode 100644
index 0000000000..7bc19faae1
--- /dev/null
+++ b/test/integration/targets/includes/roles/test_includes_free/tasks/main.yml
@@ -0,0 +1,6 @@
+- name: this needs to be here
+ debug:
+ msg: "hello"
+- include: inner.yml
+ with_items:
+ - '1'
diff --git a/test/integration/targets/includes/test_include_free.yml b/test/integration/targets/includes/test_include_free.yml
new file mode 100644
index 0000000000..4cdc1bca50
--- /dev/null
+++ b/test/integration/targets/includes/test_include_free.yml
@@ -0,0 +1,9 @@
+- hosts: testhost
+ gather_facts: no
+ strategy: free
+ roles:
+ - test_includes_free
+ tasks:
+ - assert:
+ that:
+ - "inner == 'reached'"
diff --git a/test/integration/targets/includes/test_includes.yml b/test/integration/targets/includes/test_includes.yml
index d7303880f1..ebc4c1c2a6 100644
--- a/test/integration/targets/includes/test_includes.yml
+++ b/test/integration/targets/includes/test_includes.yml
@@ -1,3 +1,5 @@
- include: test_includes2.yml parameter1=asdf parameter2=jkl
- include: test_includes3.yml
+
+- include: test_include_free.yml