Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Configuration Management with Chef-Solo

You're reading from   Configuration Management with Chef-Solo A comprehensive guide to get you up and running with Chef-Solo.

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781783982462
Length 116 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Naveed ur Rahman Naveed ur Rahman
Author Profile Icon Naveed ur Rahman
Naveed ur Rahman
Arrow right icon
View More author details
Toc

Resources


Resources are a key part of a recipe; they define which action needs to be taken, which files need to be created, and which service needs to be restarted. Resources are responsible for taking any particular action on a node. They are written in a small block of Ruby code that runs sequentially as defined in the recipe. The chef-client looks for a resource, and on successful execution of the resource, it will return the success code to the chef-client. In case of any error, chef-client will terminate the operation and display an error.

As our new machine is ready, let's use some resources and install some basic packages. We will install the vim and screen packages on our new machine. The vim package is used for editing any document, whereas the screen package is a multiplexer that allows a user to start multiple tasks inside a single terminal.

Primarily, a resource has four components: type, name, attributes with values, and action. Most of the time, attributes have default values...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime