#cloud-config autoinstall: version: 1 # Pengaturan bahasa, waktu, dan keyboard locale: en_US.UTF-8 timezone: Asia/Makassar keyboard: layout: us # Identitas akun administrator identity: realname: "TKJ Praktikum" hostname: ubuntu-server-praktikum username: tkj # GANTI dengan hash password SHA-512 crypt hasil: openssl passwd -6 # Jangan isi dengan password teks biasa. password: '$6$GANTI_DENGAN_HASH_PASSWORD_SHA512' groups: - adm - sudo # Konfigurasi jaringan menggunakan DHCP pada antarmuka Ethernet network: version: 2 ethernets: all-ethernet: match: name: "e*" dhcp4: true dhcp6: false optional: true # Instalasi dan konfigurasi SSH ssh: install-server: true allow-pw: true # Paket utilitas untuk praktikum administrasi jaringan dan server packages: - openssh-server - lshw - pciutils - dmidecode - curl - wget - vim - htop - net-tools - dnsutils - git # Partisi otomatis pada disk terbesar. # PERINGATAN: konfigurasi ini menghapus data pada disk yang dipilih. storage: config: - type: disk id: disk0 match: size: largest ptable: gpt wipe: superblock-recursive preserve: false grub_device: true # Partisi BIOS Boot untuk kompatibilitas boot BIOS/Legacy - type: partition id: bios-grub device: disk0 size: 1M flag: bios_grub # EFI System Partition untuk boot UEFI - type: partition id: esp device: disk0 size: 1G flag: boot - type: format id: esp-fs volume: esp fstype: fat32 - type: mount id: esp-mount device: esp-fs path: /boot/efi # Sisa kapasitas disk digunakan untuk root - type: partition id: root-partition device: disk0 size: -1 - type: format id: root-fs volume: root-partition fstype: ext4 - type: mount id: root-mount device: root-fs path: / updates: security # Perintah setelah sistem terpasang late-commands: - cp /cdrom/tkj-banner.sh /target/usr/local/sbin/tkj-banner.sh - chmod 0755 /target/usr/local/sbin/tkj-banner.sh - ln -sf /usr/local/sbin/tkj-banner.sh /target/etc/update-motd.d/99-tkj-praktikum - curtin in-target --target=/target -- systemctl enable ssh - curtin in-target --target=/target -- sh -c "printf '%s\\n' 'PasswordAuthentication yes' > /etc/ssh/sshd_config.d/99-tkj-praktikum.conf" shutdown: reboot