Heat Template

Zane Bitter zbitter at redhat.com
Mon Aug 19 18:49:29 UTC 2019


On 13/08/19 3:32 PM, mesut aygün wrote:
> Hi everyone;
> I am writing the template for cluster but i cant  inject the cloud-init 
> data.
> 
> How can I inject the password data for vm?
> 
> heat_template_version: 2014-10-16
> 
> 
> new_instance:
>    type: OS::Nova::Server
>    properties:
>      key_name: {get_param: key_name }
>      image: {get_param: image_id }
>      flavor: bir
>      name:
>        str_replace:
>          template: master-$NONCE-dmind
>          params:
>            $NONCE: {get_resource: name_nonce }
>      user_data: |
>        #!/bin/bash
>        #cloud-config
>        password: 724365
>        echo "Running boot script" >> /home/ubuntu/test
>        sudo sed -i "/^[^#]*PasswordAuthentication[[:space:]]no/c\PasswordAuthentication yes" /etc/ssh/sshd_config
>        sudo useradd -d /home/mesut -m mesut
>        sudo usermod --password 724365 ubuntu
>        /etc/init.d/ssh restart
> 

I believe to pass plain cloud-init data to OS::Nova::Server you need to 
set the property:

      user_data_format: RAW



More information about the openstack-discuss mailing list