Here is one of our ohai : lspci = Mixlib::ShellOut.new( 'lspci -m', <% if node['platform_family'] == 'windows' -%> :cwd => "<%= node[:pciutils][:path] %>", <% end -%> ) lspci.run_command stdout, stderr = [lspci.stdout, lspci.stderr] From: Douglas Garstang [mailto:
Has anyone got any examples of custom ohai plugins calling external shell commands in ruby and returning the result? Having trouble with it. Need to pull some EC2 tags into chef (via AWS CLI) and an ohai plugin
seemed like the right idea. Doug |
Archive powered by MHonArc 2.6.16.