base / ifcfg: make sure and set staging to use stg.iad2.fedoraproject.org domain

This should only affect stg hosts.
We had set all of iad2 the same, prod and stg both.
We need to make sure stg resolves to stg hosts first.
This worked somewhat until now because we replace the resolv.conf on stg
hosts, but without this they are borken right after boot and until we
replace the resolv.conf and restart httpd or other services.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2021-04-21 12:13:06 -07:00
parent 6e1ab9cd21
commit 6a2bff7af9

View file

@ -10,8 +10,10 @@ OPTIONS="layer2=1 portno=0"
DEFROUTE=yes
GATEWAY="{{ gw }}"
{% endif %}
{% if hostvars[inventory_hostname].datacenter == 'iad2' %}
{% if hostvars[inventory_hostname].datacenter == 'iad2' and env == 'production' %}
DOMAIN="iad2.fedoraproject.org vpn.fedoraproject.org fedoraproject.org"
{% elif hostvars[inventory_hostname].datacenter == 'iad2' and env == 'staging' %}
DOMAIN="stg.iad2.fedoraproject.org iad2.fedoraproject.org vpn.fedoraproject.org fedoraproject.org"
{% else %}
DOMAIN="vpn.fedoraproject.org fedoraproject.org"
{% endif %}