summaryrefslogtreecommitdiff
path: root/systemd/cloud-config.service.tmpl
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2017-06-13 09:06:41 -0500
committerScott Moser <smoser@brickies.net>2017-07-19 17:52:32 -0400
commitdcbe479575fac9f293c5c4089f4bcb46ab887206 (patch)
tree43fbeea7110338747135af20f9b702200f7c2607 /systemd/cloud-config.service.tmpl
parent97abd83513bee191b58f095f4d683b18acce0b49 (diff)
downloadcloud-init-git-dcbe479575fac9f293c5c4089f4bcb46ab887206.tar.gz
Templatize systemd unit files for cross distro deltas.
Under el7, cloud-init systemd files need some unit tweaks to ensure they run at the right time. Pull in current el7 downstream systemd unit changes.
Diffstat (limited to 'systemd/cloud-config.service.tmpl')
-rw-r--r--systemd/cloud-config.service.tmpl17
1 files changed, 17 insertions, 0 deletions
diff --git a/systemd/cloud-config.service.tmpl b/systemd/cloud-config.service.tmpl
new file mode 100644
index 00000000..bdee3ce0
--- /dev/null
+++ b/systemd/cloud-config.service.tmpl
@@ -0,0 +1,17 @@
+## template:jinja
+[Unit]
+Description=Apply the settings specified in cloud-config
+After=network-online.target cloud-config.target
+Wants=network-online.target cloud-config.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/cloud-init modules --mode=config
+RemainAfterExit=yes
+TimeoutSec=0
+
+# Output needs to appear in instance console output
+StandardOutput=journal+console
+
+[Install]
+WantedBy=cloud-init.target