From f1bd787692ad7e4aec5bb40c9cfb917639eea2cc Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Wed, 25 Feb 2026 02:20:47 +0000 Subject: [PATCH] Workaround cinc ohai using wrong plugins directory --- cookbooks/ohai/resources/plugin.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cookbooks/ohai/resources/plugin.rb b/cookbooks/ohai/resources/plugin.rb index 2d414bf14..c547d5f45 100644 --- a/cookbooks/ohai/resources/plugin.rb +++ b/cookbooks/ohai/resources/plugin.rb @@ -36,6 +36,22 @@ action :create do recursive true end + # cinc ohai v18.2.8 still uses plugin_path => "/etc/chef/ohai/plugins" + # so we need to ensure it exists and is linked to the correct cinc directory + directory "/etc/chef/ohai" do + owner "root" + group "root" + mode "755" + recursive true + end + + link "/etc/chef/ohai/plugins" do + to "/etc/cinc/ohai/plugins" + owner "root" + group "root" + not_if { ::File.exist?("/etc/chef/ohai/plugins") } + end + declare_resource :template, plugin_path do source new_resource.template owner "root" -- 2.39.5