Files

40 lines
1.1 KiB
Plaintext
Executable File

#cloud-config
# This template file includes some examples of how cloud-init can configure your system
# You can also check the documentation here: https://cloudinit.readthedocs.io/en/latest/reference/examples.html
# Cloud Init is very complete, can configure anything.
# Configure the host
hostname: armbian
users:
# Create an user, password disabled, sudo without password and set the SSH KEY
- name: armbian
gecos: Armbian Ops User
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, admin
lock_passwd: true
ssh_authorized_keys:
- ssh-rsa AAAA********* my@publicKey
# Running specific commands on first boot, for example, to extend a partition
# Even to extend LVM objects when LVM is used
runcmd:
- [ cloud-init-per, once, resize_part, growpart, /dev/mmcblk0, '2' ]
- [ cloud-init-per, once, resize_pv, pvresize, /dev/mmcblk0p2 ]
- [ cloud-init-per, once, resize_root, lvresize, --size,5GB,-r,vg/root ]
# You can also start by updating your APT repository and installing updates
package_update: true
package_upgrade: true
# Or Adding specific packages
packages:
- git