Skip to content

Instantly share code, notes, and snippets.

@shri3k
Created August 4, 2014 01:16
Show Gist options
  • Save shri3k/2ce9691c1409d58e9489 to your computer and use it in GitHub Desktop.
Save shri3k/2ce9691c1409d58e9489 to your computer and use it in GitHub Desktop.
chef

##Chef file create/delete:- 1.

file 'motd' do
    content 'something'
end
  1. chef-apply filename.rb
file 'motd' do
    action: delete
end
  1. Resources have actions. Create is a default action.

##Service install/start/create

  1. service 'httpd' //install by default

  2. service 'httpd' do action [:start, :enable] end

file '/var/www/html/index.html' do
content '<html>
         <body>
             <h1> hello world </h1>
         </body>
         </html>'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment