Skip to content

Commit

Permalink
WIP: ubuntu: autoinstall.yml: add
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniilKl committed Apr 23, 2024
1 parent e82ba2a commit 737d0e4
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions ubuntu/autoinstall.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#cloud-config
autoinstall:
version: 1
early-commands:
- 'sed -i "s/^nameserver [0-9.]\+/nameserver 8.8.8.8/g" /etc/resolv.conf'
packages:
- 'ubuntu-desktop'
- 'vim'
- 'tmux'
- 'git'
- 'build-essential'
- 'linux-tools-generic'
- 'acpica-tools'
- 'docker'
- 'open-vm-tools'
- 'openssh-server'
- 'libglib2.0-bin'
- 'dbus-x11'
locale: 'en_US.UTF-8'
refresh-installer:
update: true
keyboard:
layout: 'us'
network:
network:
version: 2
apt:
preserve_sources_list: false
mirror_selection:
primary:
- country-mirror
- uri: 'http://archive.ubuntu.com/ubuntu'
geoip: true
fallback: 'abort'
identity:
relaname: 'Ubuntu'
username: 'ubuntu'
hostname: '3mdeb'
# Password: ubuntu
# Generated with "openssl passwd -6"
password: '$6$eRzcYyR3Xw2elP6l$l7JXHXxbXRgD8KCx4xFt4q7aJFpsUfjjMHbfYZAlJ56GLSspojJ6ODxlauuauL72jYbwhEhGwUmzgImIVCFle0'
ssh:
install-server: true
allow-pw: true
codecs:
install: true
timezone: 'geoip'
updates: 'all'
late-commands:
- 'curtin in-target --target=/target apt update'
- 'curtin in-target --target=/target apt dpkg --configure -a'
- 'curtin in-target --target=/target apt --fix-broken install'
- 'curtin in-target --target=/target apt upgrade'
- 'curtin in-target --target=/target apt remove -y gnome-initial-setup'
- 'curtin in-target --target=/target sed -i "s/^[[:space:]#]*PasswordAuthentication.*/PasswordAuthentication yes/" /etc/ssh/sshd_config'
- 'curtin in-target --target=/target systemctl enable --now ssh'
- 'curtin in-target --target=/target sed -i "s/\(^GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 console=tty0 console=ttyS0,115200"/" /etc/default/grub'
- 'curtin in-target --target=/target sed -i "s/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=5/" /etc/default/grub'
- 'curtin in-target --target=/target sed -i "s/kernel.printk.*/kernel.printk = 1 4 1 7/" /etc/sysctl.d/10-console-messages.conf'
- 'curtin in-target --target=/target sed -i "s/^GRUB_TIMEOUT_STYLE=.*/GRUB_TIMEOUT_STYLE=menu/" /etc/default/grub'
- 'curtin in-target --target=/target sed -i "s/^GRUB_TERMINAL=.*/GRUB_TERMINAL="serial gfxterm"/" /etc/default/grub'
- 'mount --bind /proc /target/proc'
- 'mount --bind /sys /target/sys'
- 'mount --bind /dev /target/dev'
- 'curtin in-target --target=/target update-grub'
- 'curtin in-target --target=/target gsettings set org.gnome.SessionManager logout-prompt false'
shutdown: 'reboot'

0 comments on commit 737d0e4

Please sign in to comment.