variables conditions on the machine running ansible

Hello,

I am in a situation where I launch ansible from different network configuration (LAN, WAN,…)
Depending on the proxy/firewall, my git repos can have 2 different address.

the vm running ansible has the same IP in all cases ; I guess only the IP of the vm host or public IP of the vm via “getmyIP” is different.

can i ask where/how you would choose to configure ansible so that it detects its configuration without intervention ?

Thank you
Jerome

I’d use facts in combination with the “when” statement.