Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Chef Tutorials: How to write and test a chef recipe?


Step 1 – Install & Verify Chef Workstation


Step 2 – Write a following content in hello.rb


file 'index.html' do
  content "Hello everyone from DevOpsSchool"
end

Step 3 – Write a following content in hello.rb


$ chef-apply hello.rb
$ chef-apply hello.rb
$ chef-apply hello.rb -l debug
$ chef-apply hello.rb --why-run

Run the executable in why-run mode, which is a type of Chef Infra Client run that does everything except modify the system. Use why-run mode to understand why the Chef Infra Client makes the decisions that it makes and to learn more about the current and proposed state of the system.

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x