Files
Rina-deployment/cloud-init/user-data

54 lines
1.2 KiB
Plaintext

#cloud-config
# Rina VM - Debian minimal with cloud-init
# User, SSH, swap, static IP, and base setup
# Static network on VLAN 40 (br1.40). IP 192.168.40.225; adjust gateway if your VLAN 40 differs.
network:
version: 2
ethernets:
enp1s0:
addresses: [192.168.40.225/24]
routes:
- to: default
via: 192.168.40.1
nameservers:
addresses: [192.168.40.1]
users:
- name: rina
lock_passwd: false
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys: []
# Add your SSH public key here for key-based login, e.g.:
# ssh_authorized_keys:
# - ssh-ed25519 AAAA... your-key
- name: tototheo
lock_passwd: false
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys: []
chpasswd:
list: |
rina:rinapwd
tototheo:xFpbIjpHE38qzUB
expire: false
package_update: true
package_upgrade: true
packages:
- openssh-server
- cloud-guest-utils
- qemu-guest-agent
runcmd:
# Create 4 GiB swap file
- fallocate -l 4G /swapfile
- chmod 600 /swapfile
- mkswap /swapfile
- swapon /swapfile
- echo '/swapfile none swap sw 0 0' >> /etc/fstab
final_message: "Rina VM is ready. Login as rina or tototheo."