I have write the simple recipe here which is to create a directory in the node. But it shows error while running the chef-client.
directory "~/build" do
action :create
end
* Parent directory ~ does not exist, cannot create ~/build
================================================================================
Error executing action `create` on resource 'directory[~/build]'
================================================================================
Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
Parent directory ~ does not exist, cannot create ~/build
thanks for your valuable comments.
~is a shell shortcut for $HOME. Ruby has no special meaning for~so replace it by$HOMEand it will create the directory in the home of the user running chef (usually root). - Tensibai