Puppet Class: jenkins::agent

Defined in:
modules/jenkins/manifests/agent.pp

Overview

Class: jenkins::agent

Parameters:



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
29
30
31
32
# File 'modules/jenkins/manifests/agent.pp', line 3

class jenkins::agent(
    String $ssh_key,
    String $user,
    Stdlib::Unixpath $workdir,
) {
    group { $user:
        ensure => present,
        name   => $user,
    }

    user { $user:
        ensure     => present,
        shell      => '/bin/bash',
        managehome => true,
        system     => true,
        home       => "/var/lib/${user}",
    }
    file { $workdir:
        ensure => directory,
        owner  => $user,
        group  => $user,
        mode   => '0775',
    }

    # Finally publish the Jenkins controller authorized key
    ssh::userkey { $user:
        ensure  => present,
        content => $ssh_key,
    }
}