OS X system_profile Attribute info


#1

Hey there,

Bit of a question in regards to the system_profile Ohai plugin, and trying to collect a range of attribute information.

So with knife search, I’m able to create queries and return information based off the arguments in the query. For example, I have no problem getting a result when I run, for example: knife search node "platform:mac_os_x" -a chef_client
That query gives me the all of the attributes from Macs with chef_client and below. I understand that if I want specific information within the ohai plugin, I can add for example .config that gives me everything relative to config attribute in chef-client.

The problem I’m running in to is with the system_profile Ohai plugins with OS X. The plugin does a great job collecting data from Apple System Profiler. However, I’m unable to specify a specific range of attributes within the system_profiler plugin. I was wondering if anyone else is experiencing the issue. I’m curious if it’s an issue with how the array is set up when it pulls from the plist xml.

Specifically the use for this exercise is to pull Mac node serial numbers out along with models, etc (found in system_profile.10._items.0.

Thanks in advance!