Skip to content

Latest commit

 

History

History
79 lines (45 loc) · 1.83 KB

File metadata and controls

79 lines (45 loc) · 1.83 KB

How to install Puppet Server on CentOS6

Reference: http://puppetlabs.com/puppet/puppet-open-source/

Installing Puppet Master:

$ sudo yum install puppet-server

Create te file “/etc/puppet/manifests/site.pp” and insert the content below:

import "classes/*"

node default {
include sudo
}

Create the file “/etc/puppet/manifests/classes/sudo.pp” and insert the content below:

class sudo {
    file { "/etc/sudoers":
        owner => "root",
        group => "root",
        mode  => 440,
    }
}

Starting the Puppet Master:

#Start puppet master and enable startup on boot
$ sudo service puppetmaster start
$ sudo chkconfig puppetmaster on 

Installing Puppet Client:

$ sudo yum install puppet

Edit the file “/etc/sysconfig/puppet” to looks like below:

# The puppetmaster server
PUPPET_SERVER=[YOUR_PuppetMaster_DNS]
PUPPET_PORT=8140
PUPPET_LOG=/var/log/puppet/puppet.log
PUPPET_EXTRA_OPTS=--waitforcert=30

Starting the Puppet Client:

#Start puppet client and enable startup on boot
$ sudo service puppet start
$ sudo chkconfig puppet on

Signing the SSL key from the Puppet Client (in the Puppet Master server):
$ sudo puppetca --list
  puppetclient.localdomain
$ sudo puppetca --sign puppetclient.localdomain

Setting Puppet Master to autosign keys (not recommended):

Insert in the file “/etc/puppet/autosign.conf” the content like the example below:

*.yourinternaldomain.com

Run the puppet agent at the client to apply the roles:

$ sudo puppet agent --server puppetmaster.my.localdomain -t

Author:

Rafael Inocencio <rafael_rci@yahoo.com.br>
https://github.com/rcicm