Like others, I’m not sure I understand what you are asking.
chef-client runs every recipe in your run list every time. It converges every recipe every time - but then it only executes the parts that need executing. If it tried to reconfigure everything on every run, you’d have a chef-client that’s excruciatingly slow, and likely would break all kinds of things (such as restarting services in the middle of the day).
I have a feeling that you are trying to get chef-client to actually execute something every time?
There are two answers to that.
First of all, chef may be the wrong tool for that job. It is not a good replacement for cron or the like.
Secondly, it can be done. Simply have the resource depend on some condition that is never true. Or, if your goal is to run the same thing regularly, use chef to install a script into cron.
Our values: Privacy, Liberty, Justice
From: Fouts, Chris Chris.Fouts@Sensus.com
Sent: Wednesday 15th October 2014 7:23
Subject: [chef] RE: RE: How to force convergence without bootstrapping?
Sorry, let me ask it differently.
I do the following
knife bootstrap a node
knife node run_list add <node> “run_list”
chef-client on node, which converges the cookbooks
Normally, re-running chef-client on the node again will not do anything since the cookbooks have already run the first time, meaning I’ll just get an “up-to-date” message
My question is, how can I re-run chef-client to make it “act” like I have not done step 3 above the first time?
Assuming you’ve bootstrapped the node already and assigned it a role, you simply run chef client.
From: Fouts, Chris [Chris.Fouts@Sensus.com]
Received: Tuesday, 14 Oct 2014, 5:08PM
To: email@example.com mailto:firstname.lastname@example.org [email@example.com]
Subject: [chef] How to force convergence without bootstrapping?
Is there a way to “force” my cookbooks to rerun without bootstrapping my nodes?