Skip to content

Instantly share code, notes, and snippets.

@bcwaldon
Created August 7, 2014 21:39
Show Gist options
  • Save bcwaldon/12e5762f6e5b953f22c6 to your computer and use it in GitHub Desktop.
Save bcwaldon/12e5762f6e5b953f22c6 to your computer and use it in GitHub Desktop.
$ systemctl cat hello.service
# /etc/systemd/system/hello.service
[Service]
EnvironmentFile=/etc/environment
ExecStart=/usr/bin/etcdctl set /ez/server/test.example.com/%m "{\"host\": \"test.example.com\", \"ip\": \"${COREOS_PUBLIC_IPV4}\"}"
$ systemctl start hello.service
$ etcdctl get /ez/server/test.example.com/671a23809cf840f2b9c78f90ac2d4f55
{"host": "test.example.com", "ip": "172.17.8.101"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment