how to execute playbook task on Host-B directly from control machine

First i have to connect Host-A then i can connect Host-B. i can’t connect Host-B directly. So in this case how to execute playbook task on Host-B from Control Machine. Because my control machine is centralised where have running Ansible AWX. and i can’t install ansible on Host-A because there have restriction they wouldn’t allow it.

So my question is how to execute playbook task on Host-B directly from control machine

First i have to connect *Host-A*then i can connect *Host-B*. i can’t connect Host-B directly. So in this case how to execute playbook task on *Host-B *from *Control Machine. *Because my control machine is centralised where have running *Ansible AWX. * and i can't install ansible on Host-A because there have restriction they wouldn't allow it.

So my question is how to execute playbooktask on *Host-B *directly from control machine

Screenshot from 2022-03-12 23-46-07.png

Use Host-A as a jump host, e.g. https://www.jeffgeerling.com/blog/2022/using-ansible-playbook-ssh-bastion-jump-host

Regards
           Racke

Thank you sir,

But i have another question -
How to give private key and there passphrase in this case

ansible_ssh_common_args='-o ProxyCommand="ssh -p 2222 -W %h:%p -q [username@bastion.example.com](mailto:username@bastion.example.com)"'

Hi Dip Giri,

Did you get the answer of above query I am also facing the same issue.