Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Instance name

I need to follow a naming convention of 16 characters for my instance name ,but I want the hostname to just have first 8 characters. Is there a way I can get my server instance name and pass that as a hostname within the same template.


    type: OS::Nova::Server
      name: abcdefgh
      image: { get_param: image_name }
      flavor: { get_param: flavor_name }
      key_name: { get_param: key_name }

Within the same the template I should get the instance name and parse it using some resource type.

%hostname%: { get_attr: [ server_0 , name ] }
echo %hostname% | cut -c 1-5 > /etc/hostname