1
我有2个作用:厨师跳过食谱
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包括基作用
{
"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],配方[清理],配方[nginx]。请注意,它跳过了Web角色的最后配方[清理]。为什么?无论如何,我可以强制重新运行配方[清理]?
感谢您的反馈,我如何处理您提到的“关闭”角色? –
当你做了你的基地角色,你必须确保它自己在最后(有刀插件可以为此提供帮助) – Tensibai
ah .. ic。所以如果我将**配方[清理] **添加到** web **角色,那么我需要从** base **角色中删除**配方[清理] **。我对么? –