diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-02-11 12:57:50 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-02-11 12:57:50 -0500 |
commit | ceb229043cec98d79aa8e72c6eb5e79f796a96d7 (patch) | |
tree | 9798bcc587802b0fc1f0666fa50a275db2ffde22 | |
parent | 33c938c2e2d196aa9b202087cef8703abc13bc52 (diff) | |
download | vyos-cloud-init-ceb229043cec98d79aa8e72c6eb5e79f796a96d7.tar.gz vyos-cloud-init-ceb229043cec98d79aa8e72c6eb5e79f796a96d7.zip |
provide default final message in jinja to avoid WARN in log
-rw-r--r-- | cloudinit/config/cc_final_message.py | 9 | ||||
-rw-r--r-- | doc/examples/cloud-config.txt | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/cloudinit/config/cc_final_message.py b/cloudinit/config/cc_final_message.py index b24294e4..ad957e12 100644 --- a/cloudinit/config/cc_final_message.py +++ b/cloudinit/config/cc_final_message.py @@ -26,9 +26,12 @@ from cloudinit.settings import PER_ALWAYS frequency = PER_ALWAYS -# Cheetah formated default message -FINAL_MESSAGE_DEF = ("Cloud-init v. ${version} finished at ${timestamp}." - " Datasource ${datasource}. Up ${uptime} seconds") +# Jinja formated default message +FINAL_MESSAGE_DEF = ( + "## template: jinja\n" + "Cloud-init v. {{version}} finished at {{timestamp}}." + " Datasource {{datasource}}. Up {{uptime}} seconds" +) def handle(_name, cfg, cloud, log, args): diff --git a/doc/examples/cloud-config.txt b/doc/examples/cloud-config.txt index ed4eb7fc..1c59c2cf 100644 --- a/doc/examples/cloud-config.txt +++ b/doc/examples/cloud-config.txt @@ -484,7 +484,9 @@ resize_rootfs: True # final_message # default: cloud-init boot finished at $TIMESTAMP. Up $UPTIME seconds # this message is written by cloud-final when the system is finished -# its first boot +# its first boot. +# This message is rendered as if it were a template. If you +# want jinja, you have to start the line with '## template:jinja\n' final_message: "The system is finally up, after $UPTIME seconds" # configure where output will go |