summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2021-01-10 12:13:30 -0600
committerGitHub <noreply@github.com>2021-01-10 12:13:30 -0600
commitc32371db56c057bc0f382884b380258b653dd2be (patch)
tree3b5a444c9220466687249ff82eedb6bfe7540c1f /test/integration
parentcdcd2ed49aecef3bd6b62dfa6847eb2149cdf268 (diff)
downloadansible-c32371db56c057bc0f382884b380258b653dd2be.tar.gz
[stable-2.9] Fix async interpreter parsing (#72636) (#72924)
* Fix async interpreter parsing. Fixes #70690 * Target localhost instead of remote host * Don't forget inventory * Address shellcheck issue (cherry picked from commit 83764ad) Co-authored-by: Matt Martz <matt@sivel.net>
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/targets/noexec/aliases3
-rw-r--r--test/integration/targets/noexec/inventory1
-rwxr-xr-xtest/integration/targets/noexec/runme.sh9
-rw-r--r--test/integration/targets/noexec/test-noexec.yml8
4 files changed, 21 insertions, 0 deletions
diff --git a/test/integration/targets/noexec/aliases b/test/integration/targets/noexec/aliases
new file mode 100644
index 0000000000..a072dfcd2f
--- /dev/null
+++ b/test/integration/targets/noexec/aliases
@@ -0,0 +1,3 @@
+shippable/posix/group2
+skip/docker
+skip/osx
diff --git a/test/integration/targets/noexec/inventory b/test/integration/targets/noexec/inventory
new file mode 100644
index 0000000000..ab9b62c8bb
--- /dev/null
+++ b/test/integration/targets/noexec/inventory
@@ -0,0 +1 @@
+not_empty # avoid empty empty hosts list warning without defining explicit localhost
diff --git a/test/integration/targets/noexec/runme.sh b/test/integration/targets/noexec/runme.sh
new file mode 100755
index 0000000000..ff7065583a
--- /dev/null
+++ b/test/integration/targets/noexec/runme.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+set -eux
+
+trap 'umount "${OUTPUT_DIR}/ramdisk"' EXIT
+
+mkdir "${OUTPUT_DIR}/ramdisk"
+mount -t tmpfs -o size=32m,noexec,rw tmpfs "${OUTPUT_DIR}/ramdisk"
+ANSIBLE_REMOTE_TMP="${OUTPUT_DIR}/ramdisk" ansible-playbook -i inventory "$@" test-noexec.yml
diff --git a/test/integration/targets/noexec/test-noexec.yml b/test/integration/targets/noexec/test-noexec.yml
new file mode 100644
index 0000000000..3c7d756b56
--- /dev/null
+++ b/test/integration/targets/noexec/test-noexec.yml
@@ -0,0 +1,8 @@
+- hosts: localhost
+ gather_facts: false
+ tasks:
+ - ping:
+
+ - command: sleep 1
+ async: 2
+ poll: 1