Puppet Class: gocd::common::repository::redhat

Defined in:
manifests/common/repository/redhat.pp

Overview

Parameters:

  • comment (Any) (defaults to: 'ThoughtWorks GoCD YUM Repository')
  • fingerprint (Any) (defaults to: '322259C82D3082B3E32AEC2ED8843F288816C449')
  • location (Any) (defaults to: 'https://download.go.cd')
  • gpg_key_url (Any) (defaults to: undef)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'manifests/common/repository/redhat.pp', line 18

class gocd::common::repository::redhat (
  $comment     = 'ThoughtWorks GoCD YUM Repository',
  $fingerprint = '322259C82D3082B3E32AEC2ED8843F288816C449',
  $location    = 'https://download.go.cd',
  $gpg_key_url = undef,
) {
  # Lookup the RPM key from the MIT PGP key server automatically.
  $default = 'https://pgp.mit.edu/pks/lookup?op=get&options=mr&search=0x%s'

  # Use the specified key URL, or construct one from the fingerprint.
  $gpgkey = pick($gpg_key_url, sprintf($default, $fingerprint))

  yumrepo { 'thoughtworks-gocd':
    ensure   => present,
    baseurl  => $location,
    descr    => $comment,
    gpgkey   => $gpgkey,
    gpgcheck => '0',
    enabled  => '1',
  }
}