aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/signbot.pp
blob: 6d91ddd6feaaf2f3c1c474768f03c3101d8a34e3 (plain)
1
2
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
class buildsystem::signbot {
    include buildsystem::var::scheduler
    include buildsystem::var::signbot
    $sched_login = $buildsystem::var::scheduler::login

    sshuser { $buildsystem::var::signbot::login:
        homedir => $buildsystem::var::signbot::home_dir,
        comment => 'System user used to sign packages',
        groups  => [$sched_login],
    }

    gnupg::keys{ 'packages':
        email    => $buildsystem::var::signbot::keyemail,
        key_name => $buildsystem::var::signbot::keyname,
        login    => $buildsystem::var::signbot::login,
        batchdir => "${buildsystem::var::signbot::home_dir}/batches",
        keydir   => $buildsystem::var::signbot::sign_keydir,
    }

    sudo::sudoers_config { 'signpackage':
        content => template('buildsystem/signbot/sudoers.signpackage')
    }

    file { "$home_dir/.rpmmacros":
        source => 'puppet:///modules/buildsystem/signbot/signbot-rpmmacros',
    }

    mga_common::local_script {
        'sign-check-package': source => 'puppet:///modules/buildsystem/signbot/sign-check-package';
        'mga-signpackage':    source => 'puppet:///modules/buildsystem/signbot/mga-signpackage';
    }
}