Difference between revisions of "Puppet: Setup and install puppet"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
Make sure you have the [http://fedoraproject.org/wiki/EPEL EPEL] repository available. | Make sure you have the [http://fedoraproject.org/wiki/EPEL EPEL] repository available. | ||
| − | == Basic Setup == | + | == Basic Server Setup == |
<syntaxhighlight> | <syntaxhighlight> | ||
| Line 52: | Line 52: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
yum install ruby-rdoc | yum install ruby-rdoc | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | == Basic Client Setup == | ||
| + | * Install puppet | ||
| + | <syntaxhighlight> | ||
| + | yum install puppet | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | * make sure the /etc/hosts file has an entry for puppet (the master host) | ||
| + | <syntaxhighlight> | ||
| + | # this must work | ||
| + | ping puppet | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 18:42, 7 December 2012
Make sure you have the EPEL repository available.
Basic Server Setup
yum install puppet facterPuppet configuration files will be in: /etc/puppet
Create the /etc/puppet/puppet.conf file
puppetmasterd --genconfig > /etc/puppet/puppet.confCreate the default /etc/puppet/puppet.conf file. To create the first configuration, run the command:
puppetmasterd --genconfig > puppet.confAdding 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.ukCreate 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 commandsShow 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-rdocBasic Client Setup
- Install puppet
yum install puppet- make sure the /etc/hosts file has an entry for puppet (the master host)
# this must work
ping puppet