13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3 ■ MONITORING AND UPDATING3-14. Setting Up Nodes in PuppetThe previous recipes have all been using the site.pp file, which means they will be applied to everysingle client. This almost certainly isn’t what you want in most cases. Different machines can have verydifferent requirements.Before you start setting up anything complicated, you should consider how you organize your filesand manifests. There are various suggestions for best practices on the Puppet web site—whateversystem you use, make sure it is comprehensible and easily updatable. My system looks like Figure 3-3.Figure 3-3. The directory structure of the Puppet files on my puppetmasterThe subdirectories all contain class files (as discussed in a couple of paragraphs’ time), and in orderto include these, site.pp looks like this:import "classes/*"import "definitions/*"import "nodes/*"import "users/*"So far, I’ve shown the configuration for just a single machine. But, of course, Puppet really comesinto its own when you have multiple machines. If they’re all identical, you need to set up only oneconfiguration—the default one that has been set up in the previous recipes, which will then run on anyPuppet client connecting to this puppetmaster.# site.ppdefault {include sudo}85Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!