summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/strategy_free
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/strategy_free')
-rw-r--r--test/integration/targets/strategy_free/aliases1
-rw-r--r--test/integration/targets/strategy_free/inventory2
-rw-r--r--test/integration/targets/strategy_free/last_include_tasks.yml2
-rwxr-xr-xtest/integration/targets/strategy_free/runme.sh10
-rw-r--r--test/integration/targets/strategy_free/test_last_include_in_always.yml9
5 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/targets/strategy_free/aliases b/test/integration/targets/strategy_free/aliases
new file mode 100644
index 0000000..70a7b7a
--- /dev/null
+++ b/test/integration/targets/strategy_free/aliases
@@ -0,0 +1 @@
+shippable/posix/group5
diff --git a/test/integration/targets/strategy_free/inventory b/test/integration/targets/strategy_free/inventory
new file mode 100644
index 0000000..39034f1
--- /dev/null
+++ b/test/integration/targets/strategy_free/inventory
@@ -0,0 +1,2 @@
+[local]
+testhost ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}"
diff --git a/test/integration/targets/strategy_free/last_include_tasks.yml b/test/integration/targets/strategy_free/last_include_tasks.yml
new file mode 100644
index 0000000..6c87242
--- /dev/null
+++ b/test/integration/targets/strategy_free/last_include_tasks.yml
@@ -0,0 +1,2 @@
+- debug:
+ msg: "INCLUDED TASK EXECUTED"
diff --git a/test/integration/targets/strategy_free/runme.sh b/test/integration/targets/strategy_free/runme.sh
new file mode 100755
index 0000000..f5b912c
--- /dev/null
+++ b/test/integration/targets/strategy_free/runme.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+set -eux
+
+export ANSIBLE_STRATEGY=free
+
+set +e
+result="$(ansible-playbook test_last_include_in_always.yml -i inventory "$@" 2>&1)"
+set -e
+grep -q "INCLUDED TASK EXECUTED" <<< "$result"
diff --git a/test/integration/targets/strategy_free/test_last_include_in_always.yml b/test/integration/targets/strategy_free/test_last_include_in_always.yml
new file mode 100644
index 0000000..205f323
--- /dev/null
+++ b/test/integration/targets/strategy_free/test_last_include_in_always.yml
@@ -0,0 +1,9 @@
+- hosts: testhost
+ gather_facts: false
+ strategy: free
+ tasks:
+ - block:
+ - name: EXPECTED FAILURE
+ fail:
+ always:
+ - include_tasks: last_include_tasks.yml