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

Get Puppet 5 Cookbook - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.