I need to set variable in defaults\main.yml to something like:
eth1_ipaddress: {% /sbin/ifconfig eth0 | awk -F ' *|:' '/inet addr/{print $4}' %}
Is there a way to achieve this? I know this can be achived using shell and register module. But that is not what I am looking at since I need to add certain conditions before setting the variable value.