我是热模板的新手,我正在尝试从热模板运行bash脚本。但是,实例以活动状态启动,但shell脚本根本没有执行。如有任何建议,我将不胜感激。
希望对你有帮助。
parameters: DBRootPassword:
type: string
label: Database Password
description: Root password for MySQL
hidden: true
resources: my_instance:
type: OS::Nova::Server
properties:
# general properties ...
user_data:
str_replace:
template: |
#!/bin/bash
echo "Hello world"
echo "Setting MySQL root password"
mysqladmin -u root password $db_rootpassword
# do more things ...
params:
$db_rootpassword: { get_param: DBRootPassword }