Puppet Class: repoforge

Defined in:
manifests/init.pp

Overview

Class: repoforge

Configure the repoforge repository and import the GPG keys.

Parameters:

  • rpmforge_baseurl (Any) (defaults to: "http://apt.sw.be/redhat/el${::operatingsystemmajrelease}/en/\$basearch/rpmforge")
  • rpmforge_mirrorlist (Any) (defaults to: "http://mirrorlist.repoforge.org/el${::operatingsystemmajrelease}/mirrors-rpmforge")
  • rpmforge_enabled (Any) (defaults to: 1)
  • rpmforge_gpgcheck (Any) (defaults to: 1)
  • rpmforge_extras_baseurl (Any) (defaults to: "http://apt.sw.be/redhat/el${::operatingsystemmajrelease}/en/\$basearch/extras")
  • rpmforge_extras_mirrorlist (Any) (defaults to: "http://mirrorlist.repoforge.org/el${::operatingsystemmajrelease}/mirrors-rpmforge-extras")
  • rpmforge_extras_enabled (Any) (defaults to: 0)
  • rpmforge_extras_gpgcheck (Any) (defaults to: 1)
  • rpmforge_testing_baseurl (Any) (defaults to: "http://apt.sw.be/redhat/el${::operatingsystemmajrelease}/en/\$basearch/testing")
  • rpmforge_testing_mirrorlist (Any) (defaults to: "http://mirrorlist.repoforge.org/el${::operatingsystemmajrelease}/mirrors-rpmforge-testing")
  • rpmforge_testing_enabled (Any) (defaults to: 0)
  • rpmforge_testing_gpgcheck (Any) (defaults to: 1)


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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'manifests/init.pp', line 6

class repoforge (
  $rpmforge_baseurl            = "http://apt.sw.be/redhat/el${::operatingsystemmajrelease}/en/\$basearch/rpmforge",
  $rpmforge_mirrorlist         = "http://mirrorlist.repoforge.org/el${::operatingsystemmajrelease}/mirrors-rpmforge",
  $rpmforge_enabled            = 1,
  $rpmforge_gpgcheck           = 1,

  $rpmforge_extras_baseurl     = "http://apt.sw.be/redhat/el${::operatingsystemmajrelease}/en/\$basearch/extras",
  $rpmforge_extras_mirrorlist  = "http://mirrorlist.repoforge.org/el${::operatingsystemmajrelease}/mirrors-rpmforge-extras",
  $rpmforge_extras_enabled     = 0,
  $rpmforge_extras_gpgcheck    = 1,

  $rpmforge_testing_baseurl    = "http://apt.sw.be/redhat/el${::operatingsystemmajrelease}/en/\$basearch/testing",
  $rpmforge_testing_mirrorlist = "http://mirrorlist.repoforge.org/el${::operatingsystemmajrelease}/mirrors-rpmforge-testing",
  $rpmforge_testing_enabled    = 0,
  $rpmforge_testing_gpgcheck   = 1,
){

  require epel

  if ($::osfamily == 'RedHat' and $::operatingsystem !~ /Fedora|Amazon/) {
    yumrepo {
      'rpmforge':
        descr      => 'RHEL $releasever - RPMforge.net - dag',
        baseurl    => $rpmforge_baseurl,
        mirrorlist => $rpmforge_mirrorlist,
        enabled    => $rpmforge_enabled,
        gpgcheck   => $rpmforge_gpgcheck,
        gpgkey     => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag';

      'rpmforge-extras':
        descr      => 'RHEL $releasever - RPMforge.net - extras',
        baseurl    => $rpmforge_extras_baseurl,
        mirrorlist => $rpmforge_extras_mirrorlist,
        enabled    => $rpmforge_extras_enabled,
        gpgcheck   => $rpmforge_extras_gpgcheck,
        gpgkey     => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag';

      'rpmforge-testing':
        descr      => 'RHEL $releasever - RPMforge.net - testing',
        baseurl    => $rpmforge_testing_baseurl,
        mirrorlist => $rpmforge_testing_mirrorlist,
        enabled    => $rpmforge_testing_enabled,
        gpgcheck   => $rpmforge_testing_gpgcheck,
        gpgkey     => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag';
    }

    file {
      '/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        content => file('repoforge/RPM-GPG-KEY-rpmforge-dag');

      '/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-fabian':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        content => file('repoforge/RPM-GPG-KEY-rpmforge-fabian');
    }

    repoforge::rpm_gpg_key {
      'dag':
        path => '/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag';

      'fabian':
        path => '/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-fabian';
    }
  } else {
    notice("This repoforge module does not support ${::operatingsystem}.")
  }

}