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 UPDATING■ Note Find more information about this at http://reductivelabs.com/trac/puppet/wiki/LDAPNodes or inDeploying OpenLDAP by Tom Jackiewicz (Apress, 2004).A reasonable setup to start with is to have the base.pp, desktop.pp, and server.pp classes, asmentioned in the previous recipe (with server.pp and desktop.pp inheriting from base.pp). You can thenadd further puppetclass attributes (for example, webserver and nfsserver) as required for your setup.Install libldap-ruby1.8 on the Puppet server (Debian package).Add the Puppet schema to your LDAP schema directory (/etc/ldap/schema/). See recipe 2-12 for adiscussion of LDAP schemas and object identifiers (OIDs). Or just put the following in as/etc/ldap/schema/puppet.schema:# These OIDs are all fake. No guarantees there won't be conflicts.# $Id$attributetype ( 1.1.3.10 NAME 'puppetclass'DESC 'Puppet Node Class'EQUALITY caseIgnoreIA5MatchSYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )attributetype ( 1.1.3.9 NAME 'parentnode'DESC 'Puppet Parent Node'EQUALITY caseIgnoreIA5MatchSYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )objectclass ( 1.1.1.2 NAME 'puppetClient' SUP top AUXILIARYDESC 'Puppet Client objectclass'MAY ( puppetclass $ parentnode ))Add a schema line to /etc/ldap/slapd.conf:include/etc/ldap/schema/puppet.schemaRestart slapd:/etc/init.d/slapd restartYour server.pp and desktop.pp classes will now correspond to a puppetclass attribute in the LDAPtables. To modify a host, you can use an LDIF file that looks like this (this one updates the server server1and the desktop desktop1):87Download at WoweBook.Com

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

Saved successfully!

Ooh no, something went wrong!