[英]How to specify a directory for custom ohai plugins?
The ohai-example helps a lot to package a ohai plugin in a cookbook. ohai-example对在说明书中打包 ohai 插件有很大帮助。 In my default recipe I use
在我的默认配方中,我使用
ohai_plugin 'ohai-example'
After a chef.run the custom ohai plugin is placed at在chef.run 之后,自定义ohai 插件被放置在
/home/user/cookbooks/ohai/plugins/ohai-example.rb
I use the following parameters for the chef run:我对厨师运行使用以下参数:
chef-client --local-mode -c config.rb
My config.rb我的配置文件
chef_zero.enabled true
cookbook_path [
'/home/user/.chef/cookbooks', #ohai cookbook
'/home/user/cookbooks' #ohai-example cookbook
]
local_mode true
Is it possible to specify another directory for the ohai plugins?是否可以为 ohai 插件指定另一个目录?
use ohai_plugin
resource and utilize the path
attribute使用
ohai_plugin
资源并利用path
属性
path
- The path to your custom plugin directory.path
- 自定义插件目录的路径。 Defaults to a directory named 'plugins' under the directory 'ohai' in the Chef config dir.默认为 Chef 配置目录中“ohai”目录下名为“plugins”的目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.