A recipe is nothing but a list of resources !
Resource Syntax: type "name" do attribute "value" action :type_of_action end
Resource Example I (Directory Resource): directory "/tmp/folder" do owner "root" group "root" mode 0755 action :create end
Resource Example II (Package Resource): package "tar" do version "1.16.1-1" action :install end
Some attributes are available to all resources, for example some attributes are used to send notifications to other resources, whereas others are used to set up conditional execution rules.
All actions have a default value. Only non-default behaviors of actions and attributes need to be specified. For example, the package resource’s default action is to install and the name of the package defaults to the “name” of the resource, therefore it is possible to write a resource block like this:
and the chef-client will use the default action (:install) to install the tar package.