我在厨师中使用环境,我想使用每个环境的运行列表。问题是我不想重复自己(就像我现在正在做的那样)。例子:
{
"name": "myapp",
"default_attributes": {
},
"json_class": "Chef::Role",
"env_run_lists": {
"production": [
# Has less packages because services are spread across specialized nodes
"role[base]",
"recipe[mysql::client]",
"recipe[myapp]"
],
"staging": [
# Has less packages because services are spread across specialized nodes
"role[base]",
"recipe[mysql::client]",
"recipe[myapp]"
],
"development": [
"role[base]",
"recipe[mysql::client]",
"recipe[myapp]",
"role[utility]",
"role[cache]"
]
},
"run_list": [
],
"description": "The myapp.com core application role",
"chef_type": "role",
"override_attributes": {
}
}
有什么办法可以避免重复吗?
"role[base]",
"recipe[mysql::client]",
"recipe[myapp]",
我只是想避免环境运行列表不同步和破坏部署。