Puppet Class: perfsonar::repo

Defined in:
manifests/repo.pp

Summary

Manage perfsonar repo

Overview



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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'manifests/repo.pp', line 3

class perfsonar::repo {
  assert_private()

  if $facts['os']['family'] == 'RedHat' {
    if $perfsonar::manage_epel {
      contain 'epel'
    }
    if versioncmp($facts['os']['release']['major'], '8') >= 0 {
      $gpgkey_path = '/etc/pki/rpm-gpg/RPM-GPG-KEY-perfSONAR'
      $gpgkey = "file://${gpgkey_path}"
      exec { 'RPM-GPG-KEY-Globus':
        path    => '/usr/bin:/bin:/usr/sbin:/sbin',
        command => "wget -qO- ${perfsonar::release_url} | rpm2cpio - | cpio -i --quiet --to-stdout .${gpgkey_path} > ${gpgkey_path}",
        creates => $gpgkey_path,
        before  => Yumrepo['perfSONAR'],
      }
    } else {
      $gpgkey = 'http://software.internet2.edu/rpms/RPM-GPG-KEY-perfSONAR'
    }
    yumrepo { 'perfSONAR':
      descr      => 'perfSONAR RPM Repository - software.internet2.edu - main',
      mirrorlist => "http://software.internet2.edu/rpms/el${facts['os']['release']['major']}/mirrors-Toolkit-Internet2",
      enabled    => '1',
      protect    => '0',
      gpgkey     => $gpgkey,
      gpgcheck   => '1',
    }
  }

  if $facts['os']['family'] == 'Debian' {
    apt::source { 'perfsonar-release':
      ensure   => 'present',
      location => 'http://downloads.perfsonar.net/debian/',
      repos    => 'main',
      release  => 'perfsonar-release',
      include  => {
        'src' => true,
      },
      key      => {
        'id'     => '5A507954F531B92300DA2068351ED8279AFA4E0A',
        'source' => 'http://downloads.perfsonar.net/debian/perfsonar-debian-official.gpg.key',
      },
    }
  }
}