ansible: fix exec_command() regression.

pull/372/head
David Wilson 6 years ago
parent 7cd4d0828d
commit 90f89f95fb

@ -789,7 +789,7 @@ class Connection(ansible.plugins.connection.ConnectionBase):
(return code, stdout bytes, stderr bytes)
"""
emulate_tty = (not in_data and sudoable)
rc, stdout, stderr = self.call(
rc, stdout, stderr = self.get_chain().call(
ansible_mitogen.target.exec_command,
cmd=mitogen.utils.cast(cmd),
in_data=mitogen.utils.cast(in_data),

@ -1,4 +1,5 @@
---
- import_playbook: exec_command.yml
- import_playbook: put_small_file.yml
- import_playbook: put_large_file.yml

@ -0,0 +1,19 @@
# 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
- out.result[1] == "hello, world\r\n"
- out.result[2].startswith("Shared connection to ")
Loading…
Cancel
Save