diff --git a/roles/base/templates/ifcfg.j2 b/roles/base/templates/ifcfg.j2 index 807b0325fc..db94042bc1 100644 --- a/roles/base/templates/ifcfg.j2 +++ b/roles/base/templates/ifcfg.j2 @@ -8,8 +8,12 @@ OPTIONS="layer2=1 portno=0" {% endif %} {% if item in ansible_ifcfg_infra_net_devices %} DEFROUTE=yes +{% if hostvars[inventory_hostname][item +'_gw'] is defined %} +GATEWAY="{{ hostvars[inventory_hostname][item + '_gw'] }}" +{% else %} GATEWAY="{{ gw }}" {% endif %} +{% endif %} {% if hostvars[inventory_hostname].datacenter == 'iad2' %} DOMAIN="iad2.fedoraproject.org vpn.fedoraproject.org fedoraproject.org" {% else %}