Search code examples
chef-infrachef-recipeknifecookbook

Can I set roles path for knife?


When I run this command from inside a cookbook's directory on my Chef workstation I get an error:

knife list roles/
ERROR: roles: No such file or directory

I need to cd back up to the root of the chef directory and run the command for it to work.

Is there way to configure a roles path with knife the same way I have a cookbook directory so no matter where I am I can run that command?


Solution

  • The command you give is one of the "Chef FS" commands, so no you can't really customize it. Things like the *_path (except chef_repo_path) options don't apply to ChefFS.