Skip to content

Instantly share code, notes, and snippets.

@marineam
Created December 2, 2014 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marineam/e87509ddfc682ca6864a to your computer and use it in GitHub Desktop.
Save marineam/e87509ddfc682ca6864a to your computer and use it in GitHub Desktop.
Two stage cloudinit
#!/bin/bash
set -e
mkdir -p /etc/systemd/network
cat > /etc/systemd/network/00-eth.network <<EOF
[Match]
Name=eth*
[Network]
DHCP=v4
[Route]
Gateway=169.254.169.254
EOF
cat > /tmp/real-cloud-config <<EOF
#cloud-config
coreos:
whatever....
EOF
exec coreos-cloudinit -from-file=/tmp/real-cloud-config
@marineam
Copy link
Author

marineam commented Dec 3, 2014

(sadly the route+dhcp bit does not work, but it would be cool if it did...)

@yuwata
Copy link

yuwata commented Aug 19, 2019

Workaround for this is GatewayOnLink=yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment