我是 heat 模板的新手,我正在尝试从 heat 模板运行 bash 脚本。但是,该实例处于活动状态,但根本没有执行 shell 脚本。任何建议将不胜感激。
问问题
998 次
1 回答
1
希望这对你有帮助。
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 }
于 2016-01-21T14:51:52.580 回答