# Conditional Variable Based Off Fact

**URL:** <https://forum.ansible.com/t/conditional-variable-based-off-fact/17374>\
**Category:** Ansible Project\
**Created:** [January 26, 2015, 6:51pm UTC](https://forum.ansible.com/t/conditional-variable-based-off-fact/17374 "2015-01-26T18:51:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Short](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@Chris\_Short](https://forum.ansible.com/u/Chris_Short)\
**Post date:** [January 26, 2015, 6:51pm UTC](https://forum.ansible.com/t/conditional-variable-based-off-fact/17374/1 "2015-01-26T18:51:19Z")

</div>

I think I wrote the subject right… I am trying to define a variable (a different server IP address) in a task that is based off the network a system is in. If System A is in Network Z then the variable would be pulled from a list that contains a server IP address for Network Z. I am not even sure where to begin setting it all up; is this even possible?
