Created
October 17, 2020 19:14
-
-
Save castironclay/6d4e499ba7d2f5784ebf7ead550372e0 to your computer and use it in GitHub Desktop.
cloud config for hypriot raspberry pi
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 | |
# vim: syntax=yaml | |
# | |
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well | |
hostname: hostname | |
manage_etc_hosts: true | |
# You could modify this for your own user information | |
users: | |
- name: pirate | |
gecos: "Hypriot Pirate" | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
shell: /bin/bash | |
groups: users,docker,video,input | |
plain_text_passwd: hypriot | |
lock_passwd: false | |
ssh_pwauth: true | |
chpasswd: { expire: false } | |
locale: "en_US.UTF-8" | |
timezone: "America/New_York" | |
# Update apt packages on first boot | |
package_update: true | |
package_upgrade: true | |
package_reboot_if_required: true | |
packages: | |
- ntp | |
write_files: | |
- content: | | |
allow-hotplug wlan0 | |
iface wlan0 inet dhcp | |
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf | |
iface default inet dhcp | |
path: /etc/network/interfaces.d/wlan0 | |
- content: | | |
country=us | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="ssid" | |
psk="password" | |
proto=RSN | |
key_mgmt=WPA-PSK | |
pairwise=CCMP | |
auth_alg=OPEN | |
} | |
path: /etc/wpa_supplicant/wpa_supplicant.conf | |
# These commands will be ran once on first boot only | |
runcmd: | |
# Pickup the hostname changes | |
- 'systemctl restart avahi-daemon' | |
- 'ifup wlan0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment