Hi i am not able to copy folder from chefdk instances to another instances

i am using this recipe to move my local directory to node instances, can any one correct me where i went wrong

directory ‘/tmp/folder’ do
owner 'root’
group 'root’
mode '0755’
action :create

in directory i am giving my local folder path which need to move, if i do that then where i need to assign my source path in above recipe, please help me on this issue, thank you

Hi Sravan,

Copy your directory in files folder inside your cookbook and use cookbook_file resource.

cookbook_file ‘/var/lib/tomcat/webapps/litpro.war’ do
source 'litpro.war’
action :create

In the above example my litpro.war is in files/default directory.It will copy to webapps folder inside my server.

Thanks sunil for your support

You are Welcome.