Puppet¶
Puppet Open Source¶
Installing Agent¶
The puppet client
- Install the puppet repo: puppetlabs-release-pc1
- Install agent: puppet-agent
Gather Facts¶
puppet facter
Ininitialse¶
puppet agent -t
Classes¶
Modules¶
First, Puppet needs to know where to find your modules:
[root@training ~]# puppet master --configprint basemodulepath
/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
[root@training ~]# puppet master --configprint environmentpath
/etc/puppetlabs/code/environments
Directories that contain configuration. Encapsulate all components into a single folder structure.
Directory Structure¶
[root@training environments]# tree production/modules/ssh/
...
├── manifests
├── init.pp ## class ssh { ... }
└── server.pp ## class ssh\:\:server { ... }
Puppet expects to find classes in the manifests directory of your module.
Extensions have a .pp extension
The main manifest class is stored in ../<module>/manifests/init.pp The main file
Writing Modules
In the repo: /erc/puppetlabs/code/modules/
Validating¶
puppet parser validate system_users/manifests/init.pp
Linting¶
Accessing Samples¶
puppet resource host
Puppet Modules¶
- <modulename>
- manifests/init.pp => class <modulename> { ...
- examples/init.pp =?
Relationships¶
http://garylarizza.com https://www.youtube.com/user/PuppetLabsInc https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
Puppet Forge
forge.puppet.com
Doenload, use, create wrapper modules to add yoru own config