Puppet Cheat Sheet
Puppet Cheat Sheet
I’m trying to keep a log of my fixes, stuff learned while using puppet.
Many have skipped my mind already. 😦
I’ll try to change publish date on this post every time I edit it so that it stays on top.
How to find config settings or env variables in puppet?
$ puppet --configprint templatedir # Specific Env Variable
templatedir = /var/lib/puppet/templates
$ puppet --configprint all # Specific Env Variable
...
Puppet Cheat Sheet
How to syntax check your templates?
$ erb -x -T '-' ../files/apt/sources.list.erb | ruby -c
Syntax OK
$ erb -x -T '-' ../files/apt/sources.list.d/lenny-backports.list.erb | ruby -c
Syntax OK
Unable to sign certificates?
The errors could be:
- a. hostname was not match with the server certificate (or)
b. Exiting; no certificate found and waitforcert is disabled
In both cases you will not find the certificate on pupptemaster to sign.
Puppet Stayman Cheat Sheet
Solution:
1. /etc/hosts file on client should have the server listed in format
IPAddress hostname_of_server short_hostname_of_server puppet
Example: 192.168.1.90 predator01.mydomain.local predator01 puppet
2. Make sure that the domain and search parameters in /etc/resolv.conf of client is same as your host domain
Example: /etc/resolv.conf
domain local
search local
nameserver 8.8.8.8
And my hostname is human01.mydomain.local
If your hostname is like human01.yourdomain.com then 'domain' and 'search' in /etc/resolv.conf should be domain.com
3. After ensuring (1) and (2) are fixed as above, clear ssl stuff
$ cd /var/lib/puppet/ssl
$ sudo mkdir old
$ sudo mv * old/
4. Now run client again
$ sudo puppetd -tdv
5. On server sign the cert
$ sudo puppetca --list
human01.yourdomain.local
$ sudo puppetca --sign human01.yourdomain.local
Puppet Cheat Sheet
Another important difference is about the mechanism used by these Automation systems.If we check Ansible vs Puppet vs Chef, Ansible uses Push mechanism while Chef and Puppet use Pull mechanism. As we have talked about before, there are different files are created before operation in Network Automation softwares. This cheat sheet is designed for those who have already stepped forward into learning Chef but needs a more handy aid. This open-source tool, released by Opscode, is a config management technology developed primarily to automate infrastructure provisioning. Puppet Module Cheat Sheet manifests. This directory holds the module's Puppet code. Each.pp file should contain one and only one class or defined type. Run MCollective as 'peadmin'. Sudo -i -u peadmin. Check connection to nodes. Get nodes by Facter name. Mco facts timezone. Check how many MCO nodes are running. Mco puppet count.
Puppet Commands Cheatsheet
Puppet Stayman - Used by responder with at least invitational values to discover whether opener'sNotrump bid may consist of a 5 card major suit. In the sequence: 2N - 3C responder's 3C bidbehaves similar to the Stayman convention, but promising at least a 3 card major suit and at least game invitational values. Using Puppet Stayman, responder can no longer use treatments like Garbage Stayman to show a bust hand short in Clubs since opener may jump directly to 3N with a good hand lacking major support. Note: some extend Puppet Stayman to opener's 1 Notrump (1N - 2C) as well. However others object to that treatment believing the often verbose bidding sequences reveal more information to defenders than the supposed benefit discovering a 5-3 major suit fit. Using Puppet over opener's 1 Notrump bid also permits defenders to Double artificial bids during the bidding, either for lead direction or possible sacrifice bids. Classic Puppet Stayman over 1 Notrump: Note: Several variations of Puppet Stayman are in use. Method 1: Over Opener's 1Nor 2N bid,some play responder's 2C or 3C should be used when holding a 3 card major to find a possible 8 card fit when opener holds a 5 card major. If opener does not bid the anticipated major, responder signs off in 3N as: 2N - 3C; Using this method, Responder bids 4D to show both 4 card majors: 2N - 3C; Method 2 - classic treatment: Unlike Method 1 above, responder's 3N rebid promises both 4 cards majors. So in the sequence: 2N - 3C; Opener may correct to a 4 level major suit game when holding 4 cards in either major.
Classic Puppet Stayman over 2 Notrump: Some prefer to play Puppet Stayman only after opener's 2 Notrump bid. After Responder bids 3C (showing game forcing values), Opener bids 3 in the major suit with a 5 card major, 3D with a 4 card major, otherwise 3N.
Simplified Puppet Stayman over 1 Notrump: An alternative treatment is the simplified Puppet Stayman convention, credited to Marty Bergen; responder promises game-going values using this method.
|