我不熟悉heat模板,我正在尝试从heat模板运行bash脚本。但是,实例处于活动状态,但shell脚本根本没有执行。任何建议都将受到高度赞赏。
发布于 2016-01-21 22:51:53
希望这对你有帮助。
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 }https://stackoverflow.com/questions/31966998
复制相似问题