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 **角色中刪除**配方[清理] **。我對麼? –