summaryrefslogtreecommitdiff
path: root/test/integration/targets/command_shell
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2018-02-10 10:48:44 -0800
committerGitHub <noreply@github.com>2018-02-10 10:48:44 -0800
commite7b793c8c6818a32c07f4f2b3e174b9994aa8449 (patch)
treef4d5ceac8cc0c8a32344905fd4df8254d348e2fb /test/integration/targets/command_shell
parent970466827732e1d47473d06efe3fed0329d44ab1 (diff)
downloadansible-e7b793c8c6818a32c07f4f2b3e174b9994aa8449.tar.gz
Move requirements into tests. (#35885)
Diffstat (limited to 'test/integration/targets/command_shell')
-rw-r--r--test/integration/targets/command_shell/tasks/main.yml12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/integration/targets/command_shell/tasks/main.yml b/test/integration/targets/command_shell/tasks/main.yml
index b8d5438187..858f07d1a8 100644
--- a/test/integration/targets/command_shell/tasks/main.yml
+++ b/test/integration/targets/command_shell/tasks/main.yml
@@ -100,10 +100,6 @@
shell: which bash
register: bash
-- name: locate sha1sum/shasum
- shell: which sha1sum || which shasum
- register: sha1sum
-
##
## command
##
@@ -196,7 +192,7 @@
- "command_result5.stdout == 'foobar'"
- name: send to stdin literal multiline block
- command: "{{ sha1sum.stdout }}"
+ command: "{{ ansible_python_interpreter }} -c 'import hashlib, sys; print(hashlib.sha1((sys.stdin.buffer if hasattr(sys.stdin, \"buffer\") else sys.stdin).read()).hexdigest())'"
args:
stdin: |-
this is the first line
@@ -209,7 +205,7 @@
- name: assert the multiline input was passed correctly
assert:
that:
- - "command_result6.stdout == '9cd0697c6a9ff6689f0afb9136fa62e0b3fee903 -'"
+ - "command_result6.stdout == '9cd0697c6a9ff6689f0afb9136fa62e0b3fee903'"
##
## shell
@@ -278,9 +274,7 @@
"multiline echo" \
"with a new line
in quotes" \
- | {{ sha1sum.stdout }} \
- | tr -s ' ' \
- | cut -f1 -d ' '
+ | {{ ansible_python_interpreter }} -c 'import hashlib, sys; print(hashlib.sha1((sys.stdin.buffer if hasattr(sys.stdin, "buffer") else sys.stdin).read()).hexdigest())'
echo "this is a second line"
register: shell_result5