简体   繁体   English

将 ohai-plugin 替换为...?

[英]Replace ohai-plugin with...?

We've been using the ohai plugin for our windows servers.我们一直在为我们的 Windows 服务器使用ohai插件。 The plugin detects/collects the info on if there is any windows update available and/or if the server needs a reboot该插件检测/收集有关是否有任何 Windows 更新可用和/或服务器是否需要重新启动的信息

ohai_plugin 'ohai_windows_updates'
ohai_plugin 'ohai_windows_reboot'

Now I've read that ohai is deprecated.现在我读到 ohai 已被弃用。 I tried to find out how we can collect such information otherwise but I couldn't find it.我试图找出我们如何以其他方式收集此类信息,但我找不到。 Maybe you can help?也许你可以帮忙?

As the authers point out in the cookbook readme:正如作者在食谱自述文件中指出的那样:

This cookbook has been deprecated as all functionality here is now built into the Chef Infra Client itself.这本食谱已被弃用,因为这里的所有功能现在都内置在 Chef Infra 客户端本身中。 The ohai_hint resource now ships in Chef Infra Client and any plugins can be installed by placing them in an ohai directory within a cookbook in your runlist. ohai_hint 资源现在包含在 Chef Infra Client 中,任何插件都可以通过将它们放置在运行列表中的说明书中的 ohai 目录中来安装。

So the ohai_hint resource is now available since Chef Client v14.0.所以ohai_hint资源从 Chef Client v14.0 开始可用。

And about cookbooks document says that ohai/ folder in cookbook can be used as source of custom Ohai plugins written to load additional information about your nodes to be used in recipes.关于食谱文件说,食谱中的ohai/文件夹可以用作自定义 Ohai 插件的来源,编写用于加载有关要在食谱中使用的节点的附加信息。 This requires Chef Infra Server (not Client!) v12.18.14 or later.这需要 Chef Infra Server(不是客户端!)v12.18.14 或更高版本。

So to continue to use your plugins you need to make sure your Chef Infra Server is at least v12.18.14 and move plugin files into ohai/ folder of some cookbook.所以要继续使用你的插件,你需要确保你的 Chef Infra Server 至少是 v12.18.14,并将插件文件移动到一些食谱的ohai/文件夹中。

Or leave everything as is for now.或者暂时保留一切。 Because deprecation in this case means just stopping of further development - the cookbook will not we deleted.因为在这种情况下弃用意味着停止进一步的开发 - 我们不会删除食谱。 You can continue using it, if for some reason you cannot upgrade your Chef Server.如果由于某种原因您无法升级您的 Chef 服务器,您可以继续使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM