1 | initial version |
Hello,
Currently, only the following V1 standard keys are supported in cloudbase-init which have the same implementation as in cloud-init:
Those values can be addressed in the following way: {{ v1.instance_id }} .
Using the v1 namespace keys will guarantee that the cloud-config scripts can be reused by both cloud-init and cloudbase-init.
There is a ds equivalent for backward compatibility with some older implementation in cloud-init, that contains the same v1 keys + the 'hostname' key (hostname = local_hostname).
If you want to use ds.metadata namespace to get the hostname, use: {{ ds.metadata.localhostname }} or {{ ds.metadata.hostname }} . The use of ds.meta_data namespace is not recommended, as those keys depend on the metadata provider and can be different across implementations (OpenStack versus OpenNebula or Google Cloud).
More information here:
https://github.com/cloudbase/cloudbase-init/commit/72a94e0abd8fc3787a41f3cef7cf8499a3ccbc34#diff-b3977dcdaf9f10f3ff368616575b170c3bef4de9d1b372c756ee0bc29cecf6cfR246
I will add the documentation in cloudbase-init readthedocs shortly.
Thank you,
Adrian Vladu