##Chef file create/delete:- 1.
file 'motd' do
content 'something'
end
- chef-apply filename.rb
file 'motd' do
action: delete
end
- Resources have actions.
Create
is a default action.
##Service install/start/create
-
service 'httpd' //install by default
-
service 'httpd' do action [:start, :enable] end
file '/var/www/html/index.html' do
content '<html>
<body>
<h1> hello world </h1>
</body>
</html>'
end