Puppet: Setup and install puppet

From Define Wiki
Revision as of 15:15, 12 October 2012 by David (talk | contribs)
Jump to navigation Jump to search

Make sure you have the EPEL repository available.

Basic Setup

  yum install puppet facter

Puppet configuration files will be in: /etc/puppet

Create the /etc/puppet/puppet.conf file

  puppetmasterd --genconfig > /etc/puppet/puppet.conf

Create the default /etc/puppet/puppet.conf file. To create the first configuration, run the command:

  puppetmasterd --genconfig > puppet.conf

Adding in a line to autosign certs:

[main]
    logdir = /var/log/puppet
    rundir = /var/run/puppet
    ssldir = $vardir/ssl

[agent]
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig

    # dp autosign
    autosign  = /etc/puppet/autosign.conf

[master]
    certname = puppetmaster.virtual.viglen.co.uk

Create the /etc/puppet/manifests/site.pp file

  # site.pp
  import 'systems/*.pp'
  import 'classes/*.pp' # not needed immediately, only when classes are created
  Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" } # required when modules need to run exec commands

Show help

If no arguments are entered when using puppet you may get the error " No help available unless you have RDoc::usage installed" to enable help messages install ruby-rdoc.

yum install ruby-rdoc