Last active
May 1, 2019 14:39
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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