Puppet Cheat Sheet



Puppet Cheat Sheet

  1. Puppet Cheat Sheet
  2. Puppet Stayman Cheat Sheet
  3. Puppet Cheat Sheet
  4. Puppet Commands Cheatsheet
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.

Puppet Cheat Sheet

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

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.
Cheat

Puppet Stayman Cheat Sheet

Puppet 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;
3D - 3N
.

Using this method, Responder bids 4D to show both 4 card majors:

2N - 3C;
3D - 4D
.

Method 2 - classic treatment:

Unlike Method 1 above, responder's 3N rebid promises both 4 cards majors. So in the sequence:

2N - 3C;
3D - 3N

Opener may correct to a 4 level major suit game when holding 4 cards in either major.

1N - 2C;
2H/S

If 1 Notrump opener has a 5 card major, opener may rebid the major if responder makes a Notrump response. With 3+ cards in opener's 5 card major suit, responder bids game, etc (may be slam-going). Otherwise, responder makes appropriate Notrump bid.

1N - 2C;
2D

If the 1 Notrump Opener has 4 cards in a major but no 5 card major, opener begins by bidding 2D

1N - 2C;
2N

If 1 Notrump opener does not have a 5 or 4 card major, opener bids 2N.

1N - 2C;
2D - 2H/S

If the 1 Notrump opener has 4 cards in a major, opener begins by bidding 2D. Next, responder bids 4 card major notheld by the responder (Smolen-like); this allows the stronger opener to become declarer. Opener may now invite or force game in the other major with the appropriate fit; otherwise, opener may make the appropriate Notrump response.

1N - 2C;
2D - 2N

See Note:

After the 1 Notrump opener promises a 4 card major, the responder bids 2N to promise both 4 card majors.

Note: alternative treatments exist for partners that use 1N - 2N for other purposes (Minor Suit Stayman or Four Way Stayman); those players must use the 1N - 2C; 2D - 2N to show an invitational hand. The alternative treatment may substitute 3C or 3D in place of 2N to show 4-4 in both majors (others may reserve minor suit rebids to initiate slam invites in the respective minor suit).

1N - 2C;
2D - 3H/S

When the opener shows a 4 card major and the responder has 4 cards in one major and 5 cards in the other major, the responder bids the shorter 4 card major at the 3 level - thus allowing the stronger opener to become declarer.

1N - 2C;
2D - 3N

When responder does not have a 4 card major, responder signs off in 3N (implying opener does not have a 5 card major where responder does not have a 4 card 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.

2N - 3C;
3H/S

If 2 Notrump opener has a 5 card major, opener may rebid the major if responder makes a Notrump response. With 3+ cards in opener's 5 card major suit, responder bids game, etc (may be slam-going). Otherwise, responder makes appropriate Notrump bid.

2N - 3C;
3D

If the 2 Notrump opener has 4 cards in a major, opener begins by bidding 3D

2N - 3C;
3N

If 2 Notrump opener does not have a 5 or 4 card major, opener bids 3N.

2N - 3C;
3D - 3H/S

If the 2 Notrump opener has 4 cards in a major, opener begins by bidding 3D. Next, responder bids 4 card major notheld by the responder (Smolen-like); this allows the stronger opener to become declarer. Opener may now bid game in the other major with the appropriate fit; otherwise, opener bids 3N.

2N - 3C;
3D - 4C/D;

After the 2 Notrump opener's 3D promises a 4 card major, the responder may bid 4C/D to promise both 4 card majors; some play 4C is slam invitational while 4D only shows game-going values (slow shows, fast denies). Playing this treatment, opener can pre-accept bidding 4D to showing Hearts or 4N to initiate slam ask in Spades. Not surprisingly, some creative folks reverse the meaning of 4C and 4D.

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.

1N - 3C;

Like its big brother, the 3C Puppet Stayman asks opener to bid a 5 card major or bid 3D holding a 4 card major.

1N - 3C;
3D

If the 1 Notrump Opener has 4 cards in a major, Opener begins by bidding 3D

1N - 3C;
3N

If 1 Notrump opener does not have a 5 or 4 card major, Opener bids 3N.

1N - 3C;
3D - 3H/S

If the 1 Notrump opener has 4 cards in a major, opener begins by bidding 3D. Next, responder bids 4 card major notheld by the responder (Smolen-like); this allows the stronger opener to become declarer. Opener may now bid game in the other major with the appropriate fit; otherwise, opener bids 3N.