Puppet Class: profile::gerrit::migration_base

Defined in:
modules/profile/manifests/gerrit/migration_base.pp

Overview

set up user, group and data dir needed for rsyncing data on a new Gerrit host before it has the main role class

Parameters:

  • data_dir (Any) (defaults to: lookup(gerrit::server::data_dir))
  • user_name (Any) (defaults to: lookup(gerrit::server::user_name))


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'modules/profile/manifests/gerrit/migration_base.pp', line 3

class profile::gerrit::migration_base (
    $data_dir  = lookup(gerrit::server::data_dir),
    $user_name = lookup(gerrit::server::user_name),
){

    group { $user_name:
        ensure => present,
    }

    user { $user_name:
        ensure     => 'present',
        gid        => $user_name,
        shell      => '/bin/bash',
        home       => "/var/lib/${user_name}",
        system     => true,
        managehome => true,
    }

    file { $data_dir:
        ensure => directory,
        owner  => 'gerrit2',
        group  => 'gerrit2',
        mode   => '0664',
    }
}