How to execute ansible integration tests within docker environment without SSH connection

Hey Community!

We have a requirement to execute an ansible integration test within docker environment/within container (UBI9).

I was getting an SSH connection error while executing tests, SSH connection is not establishing, getting:
WARNING: SSH service not responding. Waiting 3 second(s) before checking again.

And exiting with:
FATAL: Command “ssh -o BatchMode=yes localhost id” returned exit status 255.

Standard Error
Host key verification failed.

So, i just wanted to know is there any way we can verify integration test within container/docker environment without SSH connection? since SSH is not working as it works on local machine.

Please suggest if there are any solutions to SSH issue or to run test inside container.

Many of the tests are designed explicitly to test the connection between a controller and a target and usage of the ssh connection plugin in particular.

If the container has a new enough Python so it can run ansible-core’s controller, and you’re not explicitly requesting split-controller testing (different containers for controller and target), then I don’t think SSH is used.