I am following the course instructions on chef progress website to learn chef. Currently I am working through on collecting infra code by cloning an existing repo & creating the wrapper cookbook. The problem is I run into two errors when creating the cookbook. I run the following command $ chef generate cookbooks/base -P
to create the policyfile within the cookbook but get the following error Error executing action 'create' on resource 'directory[/private/tmp/cookbooks/base]'
and
Chef::Exceptions::EnclosingDirectoryDoesNotExist
Parent directory /private/tmp/cookbooks does not exist, cannot create /private/tmp/cookbooks/base
I made sure to do all of this from the /tmp folder. Not that it matters but I repeated this before outside the /tmp folder and received the same errors.
Afterwards, I ran the code $ chef generate attribute cookbooks/base default
and received this error:
* directory[cookbooks/base/attributes] action create
* Parent directory cookbooks/base does not exist, cannot create cookbooks/base/attributes
================================================================================
Error executing action `create` on resource 'directory[cookbooks/base/attributes]'
================================================================================
Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
Parent directory cookbooks/base does not exist, cannot create cookbooks/base/attributes
Any idea why I am encountering this issue ?
below is my chef version info:
Chef Workstation version: 22.10.1013
Cookstyle version: 7.32.1
Chef Infra Client version: 17.10.0
Chef InSpec version: 4.56.20
Chef CLI version: 5.6.1
Chef Habitat version: 1.6.521
Test Kitchen version: 3.3.2