I’m using the Chef search API to search and return automatic attributes (generated via ohai). I’m interested in things like kernel and package versions to help me with software patching.
I’d like to be able to trigger a chef node to recollect those automatic attributes and save them to the chef server. I know a full chef-client run will perform this, but ideally there would be a method that couldn’t make state changes on a node. I administer a chef-server, but don’t maintain the client nodes. It’s inappropriate for me to run chef-client without permission.
I’ve tried running chef-client with an empty run-list, but discovered that does not save a node to chef server.
see https://tickets.opscode.com/browse/CHEF-3506 and CHEF-3506 - Don’t save the node object when using an override run list?
Regarding discussion on CHEF-3506, I understand that partial runs of chef-client shouldn’t update the node on the chef-server. Perhaps automatic attributes are different though as they operate independently of run lists.
Another option would be to write custom tooling to take the result of an
ohai shell command and HTTP PUT it to the chef server using the client’s key.
Thoughts / suggestions?