Cleanup and update Ubuntu and Debian scripts
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
@ -5,13 +5,39 @@ autoinstall:
|
||||
hostname: ubuntu-server
|
||||
password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
|
||||
username: ubuntu
|
||||
network:
|
||||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
eth0:
|
||||
dhcp4: yes
|
||||
early-commands:
|
||||
# otherwise packer tries to connect and exceed max attempts:
|
||||
- systemctl stop ssh
|
||||
packages:
|
||||
- ca-certificates
|
||||
- cloud-guest-utils
|
||||
- cloud-init
|
||||
ssh:
|
||||
install-server: true
|
||||
allow-pw: yes
|
||||
storage:
|
||||
swap:
|
||||
size: 0
|
||||
config:
|
||||
- { type: disk, id: disk-0, ptable: gpt, wipe: superblock-recursive, grub_device: true }
|
||||
- { type: partition, id: partition-0, number: 1, device: disk-0, size: 1M, wipe: superblock, flag: bios_grub }
|
||||
- { type: partition, id: partition-1, number: 2, device: disk-0, size: 4096M, wipe: superblock, flag: boot }
|
||||
- { type: partition, id: partition-2, number: 3, device: disk-0, size: 8192M, wipe: superblock, flag: swap }
|
||||
- { type: partition, id: partition-3, number: 4, device: disk-0, size: -1, wipe: superblock }
|
||||
- { type: format, id: format-0, volume: partition-1, fstype: ext4 }
|
||||
- { type: format, id: format-1, volume: partition-2, fstype: swap }
|
||||
- { type: format, id: format-2, volume: partition-3, fstype: ext4 }
|
||||
- { type: mount, id: mount-0, device: format-0, path: /boot }
|
||||
- { type: mount, id: mount-1, device: format-1, path: none }
|
||||
- { type: mount, id: mount-2, device: format-2, path: / }
|
||||
late-commands:
|
||||
- echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu
|
||||
- |
|
||||
curtin in-target --target=/target -- /bin/bash -c ' \
|
||||
sed -ie "s/^[#\s]*UseDNS.*$/UseDNS no/g" /etc/ssh/sshd_config; \
|
||||
@ -22,10 +48,5 @@ autoinstall:
|
||||
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
|
||||
update-grub; \
|
||||
update-initramfs -c -k all; \
|
||||
apt-get -y purge snapd; \
|
||||
systemctl disable apt-daily.service; \
|
||||
systemctl disable apt-daily.timer; \
|
||||
systemctl disable apt-daily-upgrade.service; \
|
||||
systemctl disable apt-daily-upgrade.timer; \
|
||||
exit 0 \
|
||||
'
|
Reference in New Issue
Block a user