Using SSH to open interactive session in ansible
You could try ansinble-console

It mostly feels like you just have a shell open, unless you use and ansible task name as your command, in which case prefixing it with shell &lt;whatever you wanted to run&gt; should work.