[chef] Re: Populating attributes from the system.


Chronological Thread 
  • From: Adam Leff < >
  • To:
  • Subject: [chef] Re: Populating attributes from the system.
  • Date: Tue, 08 Sep 2015 20:33:48 +0000

Doug-

If the data you're trying to extract is part of your system and not curated during a Chef run, I think Ohai is a perfect solution for this.  The first recipe in your nodes' run_lists could also deploy that Ohai plugin and reload it right away (if it needed to be deployed during that run) such that the rest of your chef-client run would have immediate access to the new plugin's data.

Could you elaborate as to why you do not feel the Ohai plugin approach is the right fit?

~Adam


On Tue, Sep 8, 2015 at 4:29 PM Doug Garstang < "> > wrote:
This problem keeps popping up, and it never feels quite right.

I need to extract some data from the system and populate node attributes from that, so that my cookbook will function.

If I use a library to get the system info, then I have move the setting of the attributes out of attributes/ files into a recipe, and make sure that recipe runs first. Any attributes that are derived from these attributes also have to be put into the same recipe. I then have some attributes being defined in attributes files and some recipes which doesn't feel right.

Writing an ohai plugin that pulls the system info means that the attributes are immediately available as ohai data when chef runs. This also feels like the wrong approach though.

What is the right way to do this?

Doug.





Archive powered by MHonArc 2.6.16.

§