Skip to content

Instantly share code, notes, and snippets.

@RickyCook
Last active August 29, 2015 14:21
Show Gist options
  • Save RickyCook/638f0f55f3ab540922bf to your computer and use it in GitHub Desktop.
Save RickyCook/638f0f55f3ab540922bf to your computer and use it in GitHub Desktop.
cloud-config
#cloud-config
coreos:
units:
- name: 00-eth0.network
runtime: true
content: |
[Match]
Name=eth0
[Network]
Address=168.235.76.77/24
Gateway=168.235.76.1
DNS=8.8.8.8
DNS=8.8.4.4
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQLK0D8oBXdM79KPyQPBAP23k/vZlLuVKc78TvrK5vVv4l1PFC+m8zD+snTd0dCdOH60VIH0kvvOJ0A8OK1mP6elWdy+6bXNjb1Imdo6IBU6gSnRMWXB9N3FomTUy3j0WZr56SDrSKlN9LGqHScPM7vtyysRXY2LhyDBEP/PrI4NKQx+qIC1zAFz8GmyE3DdxGd9CkQS8NjyQIv/+MaHCM4J6gway7wFV6LS2YO/QNDHgxkwyfhawlTcYK0Nit8qsCErJ2lNPYqiy+o0Pg/UPFkpgLoEMsodRzlF9IMlnYXBANUjNe7YLIeR9vZWv6hDtYi3ipWP35g3b+wwqkrn9B
activate application "Firefox"
delay 1
tell application "System Events"
keystroke "sudo vi /etc/systemd/network/static.network
"
keystroke "a"
keystroke "[Match]
Name=eth0
[Network]
Address=168.235.76.77/24
Gateway=168.235.76.1
DNS=8.8.8.8
DNS=8.8.4.4"
key code 53
keystroke ":wq
"
delay 2
keystroke "sudo systemctl restart systemd-networkd
"
delay 3
keystroke "cd /tmp
"
keystroke "rm cloud-config"
keystroke "*" using shift down
keystroke "
"
keystroke "wget https://gist.githubusercontent.com/RickyCook/638f0f55f3ab540922bf/raw/cloud-config
"
delay 5
keystroke "sudo coreos-install -d /dev/sda -c /tmp/cloud-config
"
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment