Chef-client command line argument for cookbook/recipe?


#1

Is there a way for chef-client to call a cookbook or recipe via the
command line without the need for a JSON?

I’m looking to have Chef be the source of a file. Some times a manual
reset of this file is required.

I’m looking to write a script that would simply make a chef-client call to
a special recipe that would pull down the original.

I wasn’t looking to have this automated in any run list, just have it
handy when we need it.


#2

Is there a way for chef-client to call a cookbook or recipe via the
command line without the need for a JSON?

I’m looking to have Chef be the source of a file. Some times a manual
reset of this file is required.

I’m looking to write a script that would simply make a chef-client call to
a special recipe that would pull down the original.

I wasn’t looking to have this automated in any run list, just have it
handy when we need it.

Sorry for the double post. First time it said I was denied.


#3

Yeah, use the override run list functionality on the CLI:

(from --help)

-o RunlistItem,RunlistItem...,   Replace current run list with

specified items
–override-runlist

Cheers,

AJ

On 19 December 2012 10:59, Matthew Sims matt@simsweb.org wrote:

Is there a way for chef-client to call a cookbook or recipe via the
command line without the need for a JSON?

I’m looking to have Chef be the source of a file. Some times a manual
reset of this file is required.

I’m looking to write a script that would simply make a chef-client call
to
a special recipe that would pull down the original.

I wasn’t looking to have this automated in any run list, just have it
handy when we need it.

Sorry for the double post. First time it said I was denied.