Skip to content

Instantly share code, notes, and snippets.

@nsteinmetz
Last active January 12, 2018 15:18
Show Gist options
  • Save nsteinmetz/1f92622949066bc3b92a75dcde65ebfd to your computer and use it in GitHub Desktop.
Save nsteinmetz/1f92622949066bc3b92a75dcde65ebfd to your computer and use it in GitHub Desktop.
hypriot 1.7.1+ with cloud-init and static ip management
write_files:
- content: |
allow-hotplug eth0
iface eth0 inet static
address 10.252.0.101
netmask 255.255.255.0
gateway 10.252.0.1
dns-nameservers 80.67.169.12 80.67.169.40
path: /etc/network/interfaces.d/eth0
[...]
# Reboot RPI so that new network config is taken into account
# Could not do it with ifdown / ifup eth0 :-/
power_state:
delay: now
mode: reboot
message: Reboot to have network
timeout: 30
condition: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment