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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3 ■ MONITORING AND UPDATINGdn: cn=server1,ou=Hosts,dc=example,dc=comadd: objectClassobjectClass: puppetClient-add: puppetclasspuppetclass: serverdn: cn=desktop1,ou=Hosts,dc=example,dc=comadd: objectClassobjectClass: puppetClient-add: puppetclasspuppetclass: desktopAdd all the other hosts you want to use with this system. Authenticate as the LDAP admin user, andrun the modification:kinit ldapadm; ldapmodify -f puppet.ldifFinally, in /etc/puppet/puppetmasterd.conf on the Puppet server, add the following:[ldap]ldapnodes = trueldapserver = ldapserver.example.comldapbase = dc=example,dc=comand restart the puppetmaster.■ Note If you’re changing the puppetmaster config or any other Puppet setup stuff, it can be useful to stop therunning puppetmaster process and restart it interactively with the verbose option: puppetmasterd --verbose.This helps a lot with debugging.3-16. Puppet: Using Facter and TemplatesAnother useful aspect of Puppet is that it works together with a piece of software called Facter. Factersets up per-host variables (such as hostname, IP address, and operating system) automatically. So, youcan apply types, configure resources, and make specific changes according to these facts, or you cancreate your own facts.To see the full lists of the facts provided by default, type facter at the command line.You can refer to these facts within Puppet with $factname. There are two important uses for thesefacts:• To create conditional structures• To use in templates88Download at WoweBook.Com

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

Saved successfully!

Ooh no, something went wrong!