【发布时间】:2015-04-07 17:18:44
【问题描述】:
我有两个角色:
base.json
{
"chef_type": "role",
"default_attributes": {},
"description": "Base Machine",
"env_run_lists": {},
"json_class": "Chef::Role",
"name": "base",
"override_attributes": {},
"run_list": [
"recipe[apt]",
"recipe[clean-up]"
]
}
web.json,其中包括 base 角色
{
"chef_type": "role",
"default_attributes": {},
"description": "Web Machine",
"env_run_lists": {},
"json_class": "Chef::Role",
"name": "web",
"override_attributes": {},
"run_list": [
"role[base]",
"recipe[nginx]",
"recipe[clean-up]"
]
}
当我运行时,run_list 会扩展为:recipe[apt]、recipe[clean-up]、recipe[nginx]。请注意,它跳过了网络角色的最后一个recipe[clean-up]。为什么?无论如何我可以强制重新运行 recipe[clean-up]?
【问题讨论】:
标签: chef-infra chef-recipe chef-solo