O'Reilly logo

Puppet 5 Cookbook - Fourth Edition by Thomas Uphill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

Follow these steps:

  1. Install Git on your Git server (git.example.com in our example). The easiest way to do this is using Puppet. Create the following manifest and call it git.pp:
package {'git':  ensure => installed}
  1. Apply this manifest using puppet apply git.pp; this will install Git.
  2. Create a Git user that the nodes will use to log in and retrieve the latest code.  Again, we'll do this with Puppet. We'll also create a directory to hold our repository (/home/git/repos), as shown in the following code snippet:
group { 'git': gid => 1111, }user {'git':  uid     => 1111,  gid     => 1111,  comment => 'Git User',  home    => '/home/git',  require => Group['git'],}file {'/home/git':  ensure  => 'directory',  owner   => 1111,  group   => 1111, require ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required