Skip to content

Instantly share code, notes, and snippets.

@josvazg
Last active May 1, 2019 14:39
Show Gist options
  • Save josvazg/03fa995beee94c12255568941e9941fe to your computer and use it in GitHub Desktop.
Save josvazg/03fa995beee94c12255568941e9941fe to your computer and use it in GitHub Desktop.
First boot cloud-init setup for a raspberry pi 3 ubuntu bionic arm64 image passing your SSH key and WIFI settings
#cloud-config
ssh_pwauth: false
chpasswd: { expire: False }
ssh_authorized_keys:
- "${SSH_KEY_CONTENTS}"
packages:
- iw
- wireless-tools
write_files:
- content: |
network:
version: 2
renderer: networkd
wifis:
wlan0:
dhcp4: yes
dhcp6: no
access-points:
"${SSID}":
password: "${SSID_PASSWORD}"
path: /etc/netplan/90-cloud-init-wifi-setup.yaml
runcmd:
- netplan apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment