Chef – 06– Simple Package Recipe

package ‘apache2’

service ‘apache2’ do
action [ :enable, :start]
end

file ‘/var/www/html/index.html’ do
content ‘<html><body><h1>Hello World</h1></body></html>’
end
#this cookbok downloads apache2 package and start the service then replace the file content with giving content
#you can see the result with

curl localhost

https://github.com/apocoder/devops/blob/master/chef/chapter_1/02_package.rb

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s