Running command modules without Python on target host

Hi,

I am working in an environment where I want to use ansible to ssh from one machine with python & ansible installed, to another (target) machine - effectively a jumphost - without python, before running a series of commands to test attached devices.

I am not able to install python on the target host, which is quite unfortunate.

Is it possible to run any of the command modules via my local machine (the one with python), for example the “expect” module, through an ssh channel, without having python installed on the target host? I.e. the result would be the same as if I had python installed on the remote host, running those command modules.

I see that there is a “raw” command module that does not need python, but I am unsure if I can pair it with a locally running “expect” module.

A long shot, but worth a try - let me know if you have the answer!

Figured it out (partly).

I can test the attached devices directly using an ssh tunnel with the following configuration as a group variable:
ansible_ssh_common_args: ‘-o ProxyCommand=“ssh -W %h:%p -q [jump host]”’

I am in an evironment in which some devices aren’t configured for ssh, believe it or not, and use telnet instead. Still trying to work out what happens in those cases.