homelab_cluster/tofu/cloud_init.cfg.yml

28 lines
654 B
YAML

#cloud-config
# vim: syntax=yaml
# Add the default user and authorized ssh key
users:
- name: ${user}
sudo: ALL=(ALL) NOPASSWD:ALL # Grant sudo without password
groups: users, wheel
shell: /bin/bash
ssh_authorized_keys:
%{ for key in ssh_authorized_keys ~}
- ${key}
%{ endfor ~}
# Optional: Run package upgrades on first boot
package_update: true
package_upgrade: true
# Optional: Disable password authentication for SSH
ssh_pwauth: false
# Optional: Install basic packages (useful for debugging or Ansible)
packages:
- vim
- curl
- wget
- git
- python3 # Usually present, but good to ensure for Ansible