사전 작업

  1. EPEL Repository 설치

Puppet Master

  1. yum install puppet-server
  2. A Simple Manifest: Managing Ownership of a File
    1. vi /etc/puppet/manifests/site.pp
    2. # /etc/puppet/manifests/site.pp   
       
      import "classes/*"   
       
      node default { 
      include sudo 
      }
      CODE
    3. Next create the sudo.pp class in /etc/puppet/manifests/classes/
    4. mkdir /etc/puppet/manifests/classes ; vi /etc/puppet/manifests/classes/sudo.pp
    5. # /etc/puppet/manifests/classes/sudo.pp  
       class sudo
              { file { "/etc/sudoers":
                      owner => "root",
                      group => "root",
                      mode => 440,
              }
      }
      RUBY
  3. service puppetmaster start
  4. chkconfig puppetmaster on

Puppet Client

  1. yum install puppet
  2. Configure the puppet client to connect to the server and enable logging. Edit the file /etc/sysconfig/puppet and uncomment the PUPPET_LOG and PUPPET_SERVER line specifying the servers address. 
  3. vi /etc/sysconfig/puppet
  4. service puppet start
  5. chkconfig puppet on


참고