Skip to content

Commit 272e9c5

Browse files
authored
[ad-integration] Update admin node UserData to persist resolv.conf. (#3763)
Update the ifcfg-eth0 file and /etc/resolv.conf attributes during the boot of the administrator node to persist the changes to resolve.conf
1 parent ed12242 commit 272e9c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cloudformation/ad/ad-integration.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ Resources:
370370
nameserver ${DnsIp1}
371371
nameserver ${DnsIp2}
372372
EOF
373+
sed -i 's/PEERDNS=.*/PEERDNS=no/' /etc/sysconfig/network-scripts/ifcfg-eth0
374+
chattr +i /etc/resolv.conf
373375
ADMIN_PW=${AdminPassword}
374376
echo $ADMIN_PW | sudo realm join -U Admin ${DirectoryDomain}
375377
sleep 10

0 commit comments

Comments
 (0)