summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/become_su
diff options
context:
space:
mode:
authorBrian Coca <bcoca@users.noreply.github.com>2021-01-18 22:02:04 +0100
committerGitHub <noreply@github.com>2021-01-18 22:02:04 +0100
commit30d93995ddcf92636919c2238435064a8089e240 (patch)
tree11c49fa53c045e715c30fca6f155fdc8955c1b72 /test/integration/targets/become_su
parentdoc: fix ansible_play_hosts description about failure (#73190) (diff)
downloadansible-30d93995ddcf92636919c2238435064a8089e240.tar.xz
ansible-30d93995ddcf92636919c2238435064a8089e240.zip
Use a pty for local connections (#73023)
* Use a pty for local connections Fixes #38696 Co-authored-by: James Cammarata <jimi@sngx.net>
Diffstat (limited to 'test/integration/targets/become_su')
-rw-r--r--test/integration/targets/become_su/aliases3
-rwxr-xr-xtest/integration/targets/become_su/runme.sh6
2 files changed, 9 insertions, 0 deletions
diff --git a/test/integration/targets/become_su/aliases b/test/integration/targets/become_su/aliases
new file mode 100644
index 0000000000..3a07aab32d
--- /dev/null
+++ b/test/integration/targets/become_su/aliases
@@ -0,0 +1,3 @@
+destructive
+shippable/posix/group1
+skip/aix
diff --git a/test/integration/targets/become_su/runme.sh b/test/integration/targets/become_su/runme.sh
new file mode 100755
index 0000000000..87a3511f65
--- /dev/null
+++ b/test/integration/targets/become_su/runme.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -eux
+
+# ensure we execute su with a pseudo terminal
+[ "$(ansible -a whoami --become-method=su localhost --become)" != "su: requires a terminal to execute" ]