From 6a2bff7af9daab0ebcd15f49545b99b914e8c4f9 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 21 Apr 2021 12:13:06 -0700 Subject: [PATCH] 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 --- roles/base/templates/ifcfg.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/base/templates/ifcfg.j2 b/roles/base/templates/ifcfg.j2 index 807b0325fc..c6c578f3b2 100644 --- a/roles/base/templates/ifcfg.j2 +++ b/roles/base/templates/ifcfg.j2 @@ -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 %}