Puppet Class: globus::repo::deb

Defined in:
manifests/repo/deb.pp

Summary

Manage globus 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'manifests/repo/deb.pp', line 3

class globus::repo::deb {
  $release_name = basename($globus::release_url)
  $repo_dir     = '/usr/share/globus-toolkit-repo'
  $release_path = "${repo_dir}/${release_name}"
  $repo_key     = "${repo_dir}/RPM-GPG-KEY-Globus"
  if String($globus::version) == '5' {
    $gcs_ensure = 'present'
  } else {
    $gcs_ensure = 'absent'
  }
  if $globus::enable_testing_repos {
    $testing_ensure = 'present'
    if $gcs_ensure == 'absent' {
      $gcs_testing_ensure = 'absent'
    } else {
      $gcs_testing_ensure = 'present'
    }
  } else {
    $testing_ensure = 'absent'
    $gcs_testing_ensure = 'absent'
  }

  file { $repo_dir:
    ensure => 'directory',
    owner  => 'root',
    group  => 'root',
    mode   => '0755',
  }

  exec { 'curl-globus-release':
    path    => '/usr/bin:/bin:/usr/sbin:/sbin',
    command => "curl -Ls --show-error -o ${release_path} ${globus::release_url}",
    creates => $release_path,
    require => File[$repo_dir],
    before  => Exec['extract-globus-repo-key'],
  }

  exec { 'extract-globus-repo-key':
    path    => '/usr/bin:/bin:/usr/sbin:/sbin',
    command => "dpkg --fsys-tarfile ${release_path} | tar xOf - .${repo_key} > ${repo_key}",
    creates => $repo_key,
  }

  apt::source { 'globus-toolkit-6-stable':
    ensure   => 'present',
    location => $globus::toolkit_repo_baseurl,
    release  => $facts['os']['distro']['codename'],
    repos    => 'contrib',
    include  => {
      'src' => true,
    },
    key      => {
      'id'     => '66A86341D3CDB1B26BE4D46F44AE7EC2FAF24365',
      'source' => $repo_key,
    },
    require  => Exec['extract-globus-repo-key'],
  }

  apt::source { 'globus-toolkit-6-testing':
    ensure   => $testing_ensure,
    location => $globus::toolkit_repo_testing_baseurl,
    release  => $facts['os']['distro']['codename'],
    repos    => 'contrib',
    include  => {
      'src' => true,
    },
    key      => {
      'id'     => '66A86341D3CDB1B26BE4D46F44AE7EC2FAF24365',
      'source' => $repo_key,
    },
    require  => Exec['extract-globus-repo-key'],
  }

  apt::source { 'globus-connect-server-stable':
    ensure   => $gcs_ensure,
    location => $globus::gcs_repo_baseurl,
    release  => $facts['os']['distro']['codename'],
    repos    => 'contrib',
    include  => {
      'src' => true,
    },
    key      => {
      'id'     => '66A86341D3CDB1B26BE4D46F44AE7EC2FAF24365',
      'source' => $repo_key,
    },
    require  => Exec['extract-globus-repo-key'],
  }

  apt::source { 'globus-connect-server-testing':
    ensure   => $gcs_testing_ensure,
    location => $globus::gcs_repo_testing_baseurl,
    release  => $facts['os']['distro']['codename'],
    repos    => 'contrib',
    include  => {
      'src' => true,
    },
    key      => {
      'id'     => '66A86341D3CDB1B26BE4D46F44AE7EC2FAF24365',
      'source' => $repo_key,
    },
    require  => Exec['extract-globus-repo-key'],
  }
}