When present Ansible a compliant hostname it is also able to run the command successfully:
ansible -vvv all -i 'myuser@nameofprivilegeduserontargetserver@targetserve...@nameofsshproxy.srv.domain,' -a "uname -a" -u myuser --ask-pass
But this creates the problem that all my inventory files would need to contain this strange syntax and this messes up my hosts / groups concept (I need to be able to tell Ansible "do task x on server group webservers, targetserver.srv.domain being the first of my webservers")
An additional problem is that instead of "myuser" all my colleagues would need to run the same with "theiruser1", "theiruser2" and so on and this would make the list of hosts grow considerably list servers multiple times which is ineffective.
Unable to parse address from hostname, leaving unchanged: Not a valid network hostname: myuser@nameofprivilegeduserontargetserver@targetserve...@nameofsshproxy.srv.domain
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/commands/command.py
<myuser@nameofprivilegeduserontargetserver@targetserve...@nameofsshproxy.srv.domain> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=myuser -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/b5ad891d41 myuser@nameofprivilegeduserontargetserver@targetserve...@nameofsshproxy.srv.domain '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /tmp/ansible-tmp-1548258807.51-5121098331994 `" && echo ansible-tmp-1548258807.51-5121098331994="` echo /tmp/ansible-tmp-1548258807.51-5121098331994 `" ) && sleep 0'"'"''
I had a look at the source of the ssh connection plugin (but I am certainly no Python guy) and mitogen but found no way to configure them in order to have Ansible use the crude connection syntax I need. I even thought about telling Ansible to use a different ssh binary but failed in creating a concept of what this binary / bash script would need to do in order to be compatible with Ansibles demands.(By the way: in a previous attempt I asked a comparable question in the OpenSSH mailing list and didn't get a definitive answer how this can be solved with OpenSSH config file means: https://lists.gt.net/openssh/dev/70081)