CompetetivePapaya3
CompetetivePapaya3

Reputation: 1

Chef: is there a way to compare the "status quo" to the "planned changes" and the "planned changes" to the "executed run"?

I would like to be able to extract the following information from Chef:

  1. current state of the node vs. planned changes
  2. panned changes vs state after the actual chef-client run

So far, I had the following idea:

  1. compare knife node show && chef-client -W(log of why-run)
    • however, the output is in a different format (JSON vs log), I would have to parse the log and convert it into JSON (outch?)
  2. compare chef-client -W(log of why-run) && chef-client(log):
    • here I could compare the two

What I want to achieve is some sort of change management visualized here

In a form a trimmed down version of what Chef Automate seems to offer. I`m not sure if I'm actually shooting off my whole leg here. Any pointers are welcome.

Upvotes: 0

Views: 57

Answers (1)

coderanger
coderanger

Reputation: 54181

Use the same hooks as Automate, write an event handler that records changes and sends them somewhere. https://docs.chef.io/handlers.html#event-handlers

Upvotes: 1

Related Questions