3
\me
@ s U d Z ddlZddlmZ ddlmZmZmZ ddlm Z ddl
mZ ddlm
Z
mZ ddlmZ dd lmZ d
ZeZddd
eegeedgg dZe
ejeZeeZ dZeee eddddZdS )z@Final Message: Output final message when cloud-init has finished N)dedent) templaterutilversion)Cloud)Config)
MetaSchemaget_meta_doc)ALL_DISTROS)
PER_ALWAYSa This module configures the final message that cloud-init writes. The message is
specified as a jinja template with the following variables set:
- ``version``: cloud-init version
- ``timestamp``: time at cloud-init finish
- ``datasource``: cloud-init data source
- ``uptime``: system uptime
This message is written to the cloud-init log (usually /var/log/cloud-init.log)
as well as stderr (which usually redirects to /var/log/cloud-init-output.log).
Upon exit, this module writes the system uptime, timestamp, and cloud-init
version to ``/var/lib/cloud/instance/boot-finished`` independent of any
user data specified for this module.
Zcc_final_messagez
Final Messagez1Output final message when cloud-init has finishedz final_message: |
cloud-init has finished
version: $version
timestamp: $timestamp
datasource: $datasource
uptime: $uptime
)idnametitledescriptionZdistros frequencyZexamplesZactivate_by_schema_keyszy## template: jinja
Cloud-init v. {{version}} finished at {{timestamp}}. Datasource {{datasource}}. Up {{uptime}} seconds)r
cfgcloudargsreturnc C s0 d}t |dkrt|d }ntj|dd}|j }|s