# variables conditions on the machine running ansible

**URL:** <https://forum.ansible.com/t/variables-conditions-on-the-machine-running-ansible/13960>\
**Category:** Ansible Project\
**Created:** [November 21, 2013, 7:07pm UTC](https://forum.ansible.com/t/variables-conditions-on-the-machine-running-ansible/13960 "2013-11-21T19:07:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerome\_Wagner](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@Jerome\_Wagner](https://forum.ansible.com/u/Jerome_Wagner)\
**Post date:** [November 21, 2013, 7:07pm UTC](https://forum.ansible.com/t/variables-conditions-on-the-machine-running-ansible/13960/1 "2013-11-21T19:07:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 23, 2013, 4:06pm UTC](https://forum.ansible.com/t/variables-conditions-on-the-machine-running-ansible/13960/2 "2013-11-23T16:06:57Z")

</div>

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