{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/bugs/issues/409","labels_url":"https://api.github.com/repos/coreos/bugs/issues/409/labels{/name}","comments_url":"https://api.github.com/repos/coreos/bugs/issues/409/comments","events_url":"https://api.github.com/repos/coreos/bugs/issues/409/events","html_url":"https://github.com/coreos/bugs/issues/409","id":94673973,"number":409,"title":"How to embed /run/systemd/system/etcd2.service.d/20-cloudinit.conf ?","user":{"login":"Dynom","id":39014,"avatar_url":"https://avatars.githubusercontent.com/u/39014?v=3","gravatar_id":"","url":"https://api.github.com/users/Dynom","html_url":"https://github.com/Dynom","followers_url":"https://api.github.com/users/Dynom/followers","following_url":"https://api.github.com/users/Dynom/following{/other_user}","gists_url":"https://api.github.com/users/Dynom/gists{/gist_id}","starred_url":"https://api.github.com/users/Dynom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dynom/subscriptions","organizations_url":"https://api.github.com/users/Dynom/orgs","repos_url":"https://api.github.com/users/Dynom/repos","events_url":"https://api.github.com/users/Dynom/events{/privacy}","received_events_url":"https://api.github.com/users/Dynom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-13T09:09:21Z","updated_at":"2015-07-13T09:20:10Z","closed_at":null,"body":"The file `/run/systemd/system/etcd2.service.d/20-cloudinit.conf` contains all the information I need regarding Etcd's connection strings. Most snippets I see simply hard-core the ports, which is not something I prefer. How can I make the contents of `20-cloudinit.conf` available in my unit file?\r\nI've tried the obvious:\r\n\r\nEnvironmentFile=/run/systemd/system/etcd2.service.d/20-cloudinit.conf\r\n\r\nHowever since `20-cloudinit.conf` contains the following syntax, it's not supported by Systemd (as it expects `key=\"value\"` and not `Environment=\"key=value\"`, if I understand correctly. http://www.freedesktop.org/software/systemd/man/systemd.exec.html#EnvironmentFile=)\r\n\r\ncontents of 20-cloudinit.conf:\r\n```\r\n[Service]\r\nEnvironment=\"ETCD_ADVERTISE_CLIENT_URLS=http://10.29.115.197:2379,http://10.29.115.197:4001\"\r\nEnvironment=\"ETCD_DISCOVERY=https://discovery.etcd.io/a9d42be514b49f04f02479ec1e151b03\"\r\nEnvironment=\"ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.29.115.197:2380\"\r\nEnvironment=\"ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379,http://0.0.0.0:4001\"\r\nEnvironment=\"ETCD_LISTEN_PEER_URLS=http://10.29.115.197:2380\"\r\n```\r\n\r\nIn my unit file I'd like something like this:\r\n```\r\n..\r\nEnvironmentFile=/run/systemd/system/etcd2.service.d/20-cloudinit.conf\r\n\r\nExecStartPre=/usr/bin/echo \"ETCD_MACHINES=${ETCD_ADVERTISE_CLIENT_URLS}\"\r\n..\r\n```\r\n\r\nOriginal question was asked here: https://github.com/coreos/etcd/issues/3110"},"comment":{"url":"https://api.github.com/repos/coreos/bugs/issues/comments/120865110","html_url":"https://github.com/coreos/bugs/issues/409#issuecomment-120865110","issue_url":"https://api.github.com/repos/coreos/bugs/issues/409","id":120865110,"user":{"login":"mischief","id":1487996,"avatar_url":"https://avatars.githubusercontent.com/u/1487996?v=3","gravatar_id":"","url":"https://api.github.com/users/mischief","html_url":"https://github.com/mischief","followers_url":"https://api.github.com/users/mischief/followers","following_url":"https://api.github.com/users/mischief/following{/other_user}","gists_url":"https://api.github.com/users/mischief/gists{/gist_id}","starred_url":"https://api.github.com/users/mischief/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mischief/subscriptions","organizations_url":"https://api.github.com/users/mischief/orgs","repos_url":"https://api.github.com/users/mischief/repos","events_url":"https://api.github.com/users/mischief/events{/privacy}","received_events_url":"https://api.github.com/users/mischief/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T09:20:10Z","updated_at":"2015-07-13T09:20:10Z","body":"`/run/systemd/system/etcd2.service.d/20-cloudinit.conf` is a systemd drop-in. see `Example 2. Overriding vendor settings` at [systemd.unit](http://www.freedesktop.org/software/systemd/man/systemd.unit.html).\r\n\r\nyou could make a symlink from `/etc/systemd/system/some-etcd-client.service.d/etcd2.conf` to `/run/systemd/system/etcd2.service.d/20-cloudinit.conf`. i believe you would need to somehow call `systemctl daemon-reload` for this to have effect, though."}}