Skip to content

Instantly share code, notes, and snippets.

@skinny
Created November 11, 2015 21:19
Show Gist options
  • Save skinny/5c69c72a6ea979933eb4 to your computer and use it in GitHub Desktop.
Save skinny/5c69c72a6ea979933eb4 to your computer and use it in GitHub Desktop.
initial-boot
#cloud-config
write_files:
- path: /opt/bin/curl-retry.sh
permissions: '0755'
owner: root
content: |
#!/bin/sh -x
until curl $@
do sleep 1
done
coreos:
units:
- name: systemd-networkd.service
command: stop
- name: 01-enp5s0f0.network
content: |
[Match]
Name=enp5s0f0
[Network]
DHCP=yes
- name: 99-dhcp.network
runtime: true
content: |
[Match]
Name=en*
[Network]
DHCP=no
- name: down-interfaces.service
command: start
content: |
[Service]
Type=oneshot
ExecStart=/usr/bin/ip link set enp2s0f0 down
ExecStart=/usr/bin/ip addr flush dev enp2s0f0
ExecStart=/usr/bin/ip link set enp2s0f1 down
ExecStart=/usr/bin/ip addr flush dev enp2s0f1
ExecStart=/usr/bin/ip link set enp4s0f0 down
ExecStart=/usr/bin/ip addr flush dev enp4s0f0
ExecStart=/usr/bin/ip link set enp4s0f1 down
ExecStart=/usr/bin/ip addr flush dev enp4s0f1
ExecStart=/usr/bin/ip link set enp5s0f0 down
ExecStart=/usr/bin/ip addr flush dev enp5s0f0
ExecStart=/usr/bin/ip link set enp5s0f1 down
ExecStart=/usr/bin/ip addr flush dev enp5s0f1
- name: systemd-networkd.service
command: restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment