2018-09-10 00:31:15 +00:00
|
|
|
# Test basic functinality of exec_command.
|
|
|
|
---
|
|
|
|
|
|
|
|
- name: integration/connection/exec_command.yml
|
|
|
|
hosts: test-targets
|
|
|
|
gather_facts: no
|
|
|
|
any_errors_fatal: true
|
|
|
|
tasks:
|
|
|
|
- connection_passthrough:
|
|
|
|
method: exec_command
|
|
|
|
kwargs:
|
|
|
|
cmd: echo "hello, world"
|
|
|
|
register: out
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- out.result[0] == 0
|
2018-11-05 13:15:20 +00:00
|
|
|
- out.result[1].decode() == "hello, world\r\n"
|
|
|
|
- out.result[2].decode().startswith("Shared connection to ")
|