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 (Stdlib::Unixpath) (defaults to: lookup('profile::gerrit::migration::data_dir'))
  • user_name (String) (defaults to: lookup('profile::gerrit::migration::user_name'))
  • daemon_user (String) (defaults to: lookup('profile::gerrit::daemon_user'))


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
28
# File 'modules/profile/manifests/gerrit/migration_base.pp', line 3

class profile::gerrit::migration_base (
    Stdlib::Unixpath $data_dir = lookup('profile::gerrit::migration::data_dir'),
    String $user_name          = lookup('profile::gerrit::migration::user_name'),
    String $daemon_user        = lookup('profile::gerrit::daemon_user'),
){

    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  => $daemon_user,
        group  => $daemon_user,
        mode   => '0664',
    }
}