New Question

Revision history [back]

click to hide/show revision 1
initial version


Currently, only the following V1 standard keys are supported in cloudbase-init which have the same implementation as in cloud-init:

  • instance_id
  • local_hostname
  • publicsshkeys

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:

I will add the documentation in cloudbase-init readthedocs shortly.

Thank you,
Adrian Vladu