Hello,

thank you for your reply. I think you can say it like you wrote it, yes. 

So if I understand the given link correctly:

I need to specify my servers in this line:
 #ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q 
*[email protected]*"'

While the inventory file contains the IP of the virtual machine located on 
the servers
#[VM] foo ansible_host=192.168.1.1 

The problem is that my Servers (the jumhosts as you've called it) have 
different IPs, but the VM located on the server always have the same IP.
This is like a reverse use case (?)
So I somehow need to parse my (different) servers to 
*"[email protected]"*. 

Any idea how I can realize this? Probably use a variable for 
"gateway.example.com" and loop through that variable?

Best regards
Peter


[email protected] schrieb am Sonntag, 20. Juni 2021 um 06:32:37 UTC+2:

>
> https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-configure-a-jump-host-to-access-servers-that-i-have-no-direct-access-to
>
> From your story it seems that what you call jumphost is the ansible 
> controller and each server is a jumphost.
>
>
>
> On Sat, 19 Jun 2021 at 19:30, [email protected] <[email protected]> wrote:
>
>> Hello Guys,
>>
>> I have Ansible installed on a jumphost. From the jumphost I can reach 
>> several servers (with different IPs), each running a virtual machine (that 
>> VM has the same IP on each server).
>> I need to read the information of a certain file that is located on the 
>> virtual machines (not on the servers).
>> That means Ansible have to establish a SSH connection to the server and 
>> from there it have to establish another SSH connection to the VM. 
>> (Jumphost [Ansible Controller] --> Server --> VM)
>>
>> I assume that the realization of this use case is possible with Ansible 
>> (?)
>> However, I don't really know how to google for this problem. 
>> Is there some kind of best practice for this use case? 
>>
>> Maybe you can provide me a link, which explains how to solve that problem 
>> or a similar problem?
>>
>> I am grateful for any help :)
>>
>> Kind regards,
>> Peter
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/3cdbcbc5-7b3b-4ab2-9075-8eec29b75576n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/3cdbcbc5-7b3b-4ab2-9075-8eec29b75576n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> -- 
> Sent from a mobile device - please excuse the brevity, spelling and 
> punctuation.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9126290b-3ac0-4c8b-be20-1af22f7c5a98n%40googlegroups.com.

Reply via email to