使用自定义ohai插件的运行列表中食谱的顺序

问题描述 投票:0回答:1

我有一个包装好的食谱,其中包含一个自定义的ohai插件。这个插件在我的第二本食谱中使用。我的config.rb文件正确吗?

cookbook_path [
    '/home/user/.chef/cookbooks',   #<< ohai cookbook
    '/home/user/cookbooks'          #<< wrapper cookbook (ohai plugin) and second cookbook
]

ohai.plugin_path += [
   '/home/user/cookbooks/ohai/plugins'
]

ohai.directory '/home/user/cookbooks/ohai/plugins'

是否有必要在第二本食谱之前将带有ohai插件的包装食谱包含在运行列表中?

chef ohai-gem
1个回答
0
投票

使用ohai resource加载自定义插件。

© www.soinside.com 2019 - 2024. All rights reserved.