Zhenkai
Zhenkai

Reputation: 328

How can I specify repository path using chef client local mode

I understand it will scan current directory for repository. is there an alternative except switch current working directory to where local repository is before invoking chef client local mode

Upvotes: 2

Views: 5227

Answers (1)

Display Name is missing
Display Name is missing

Reputation: 6227

Similar to what you used to do with chef-solo (in the solo.rb) file, you can do with your client.rb file:

cookbook_path   ["/path/to/directory/containing/cookbooks"]

From the Chef docs - cookbook_path "The sub-directory for cookbooks on the chef-client. This value can be a string or an array of file system locations, processed in the specified order. The last cookbook is considered to override local modifications."

Otherwise it will scan the current directory repo.

Upvotes: 3

Related Questions