How to get Ansible to work with local ip addresses when connected via VPN?

Good afternoon. There is one local network to which I connect via VPN, and want it to work from the network to your local machine where you installed Ansible. The thing is that in both networks ip address: 192.168.1.X. For VPN I'm connecting to a single external ip address, and then I have to go to all other machines on the network. How to implement it? Just indicate in the inventory the address of the form 192.168.1.X? But not useful if Ansible in the first network?
July 2nd 19 at 13:21
2 answers
July 2nd 19 at 13:23
And you can you do to cling on ssh to the hosts of the network which is behind a vpn?
Only one, and since it has to go via ssh across the network. - jessy_Daugherty commented on July 2nd 19 at 13:26
And playbook'run on that host, which can come in all should work on hurrah - maye66 commented on July 2nd 19 at 13:29
: the fact of the matter is that you need to run it locally, as such networks some more. - jessy_Daugherty commented on July 2nd 19 at 13:32
well, then configure routing on the local host, so packets to 192.168.1.X walked through the tunnel the other way, I don't see - maye66 commented on July 2nd 19 at 13:35
: I'm sure somehow you can make ansible went to the first car raised there is a tunnel, and from there scattered all. - jessy_Daugherty commented on July 2nd 19 at 13:38
: fantastic! :) if you find a way - leave link - Terrell.Stehr18 commented on July 2nd 19 at 13:41
Isn't it?
https://blog.scottlowe.org/2015/12/24/running-ansi... - judge.Litt commented on July 2nd 19 at 13:44
July 2nd 19 at 13:25
Depends on routing on Your computer: if 192.168.1.X is specified on the VPN interface and not overlapping the first network, there will be no problem to walk (but then in a local network 192.168.1.X will not fall).
As pointed out by estoy - if you now go to ssh, and ansible will be no problem.
now I do add ip route 192.0.1.0/24 via 10.0.0.1, when I start openvpn. But I am interested to connect to the car with a white ip, and jump from it to other, more to do ansible. - jessy_Daugherty commented on July 2nd 19 at 13:28

Find more questions by tags AnsibleNetwork administrationVPN