@@ -1401,6 +1401,16 @@ Resources:
1401
1401
mode : " 000644"
1402
1402
owner : " root"
1403
1403
group : " root"
1404
+ " /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf " :
1405
+ content : |
1406
+
1407
+ [Service]
1408
+ ExecStart=
1409
+ ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --timeout=3
1410
+
1411
+ mode : " 000644"
1412
+ owner : " root"
1413
+ group : " root"
1404
1414
" /root/install-sw.sh " :
1405
1415
content : !Sub |
1406
1416
#!/bin/bash
@@ -1469,11 +1479,18 @@ Resources:
1469
1479
echo "export AWS_CLI_AUTO_PROMPT=on-partial" >> /home/ubuntu/.bashrc
1470
1480
1471
1481
# Certbot: https://eff-certbot.readthedocs.io/en/stable/install.html#snap-recommended
1472
- snap install --classic certbot
1482
+ sudo snap install certbot --classic
1473
1483
ln -s /snap/bin/certbot /usr/bin/certbot
1484
+ sudo snap set certbot trust-plugin-with-root=ok
1485
+ sudo snap install certbot-dns-route53
1474
1486
1475
- snap set certbot trust-plugin-with-root=ok
1476
- snap install certbot-dns-route53
1487
+ # Ubuntu 24.04: reduce systemd-networkd-wait-online.service 2+ min timeout
1488
+ if (lsb_release -r -s | grep -q 24); then
1489
+ sed -i "s/systemd-networkd-wait-online$/& --timeout=3/g" /usr/lib/systemd/system/systemd-networkd-wait-online.service
1490
+ else
1491
+ rm -f /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf
1492
+ fi
1493
+ systemctl daemon-reload
1477
1494
1478
1495
rm -f ${!0}
1479
1496
mode : " 000740"
@@ -1545,6 +1562,12 @@ Resources:
1545
1562
sed -i "s/Prompt=lts/Prompt=never/g" /etc/update-manager/release-upgrades
1546
1563
chown -R ubuntu:ubuntu /home/ubuntu/.config
1547
1564
1565
+ # Ubuntu 24.04: reduce systemd-networkd-wait-online.service 2+ min timeout
1566
+ if (lsb_release -r -s | grep -q 24); then
1567
+ sed -i "s/systemd-networkd-wait-online$/& --timeout=3/g" /usr/lib/systemd/system/systemd-networkd-wait-online.service
1568
+ fi
1569
+ systemctl daemon-reload
1570
+
1548
1571
rm -f ${!0}
1549
1572
mode : " 000740"
1550
1573
owner : " root"
@@ -1557,12 +1580,26 @@ Resources:
1557
1580
mode : " 000644"
1558
1581
owner : " ubuntu"
1559
1582
group : " ubuntu"
1583
+ " /etc/skel/.gnomerc " :
1584
+ content : |
1585
+ export XDG_CURRENT_DESKTOP=ubuntu:GNOME
1586
+ export GNOME_SHELL_SESSION_MODE=ubuntu
1587
+ export XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop
1588
+ mode : " 000644"
1589
+ owner : " root"
1590
+ group : " root"
1560
1591
" /home/ubuntu/.config/gnome-initial-setup-done " :
1561
1592
content : |
1562
1593
yes
1563
1594
mode : " 000664"
1564
1595
owner : " ubuntu"
1565
1596
group : " ubuntu"
1597
+ " /etc/skel/.config/gnome-initial-setup-done " :
1598
+ content : |
1599
+ yes
1600
+ mode : " 000644"
1601
+ owner : " root"
1602
+ group : " root"
1566
1603
commands :
1567
1604
install :
1568
1605
command : " /root/install-dcv.sh > /var/log/install-dcv.log 2>&1"
@@ -2167,7 +2204,7 @@ Outputs:
2167
2204
2168
2205
EC2serialConsole :
2169
2206
Description : EC2 Serial Console
2170
- Value : !Sub "https://${AWS::Region}.console.aws.amazon.com/ec2-instance-connect/ssh?& connType=serial&instanceId=${ec2Instance}&serialPort=0#/"
2207
+ Value : !Sub "https://${AWS::Region}.console.aws.amazon.com/ec2-instance-connect/ssh?connType=serial&instanceId=${ec2Instance}&serialPort=0#/"
2171
2208
2172
2209
EC2iamRole :
2173
2210
Description : EC2 IAM role
0 commit comments