Sha256: 6fc23bc3f7204732da2d5b5378884c9ea81ddb9ee1cd1399f7aa7049ea53b7bd

Contents?: true

Size: 1.16 KB

Versions: 14

Compression:

Stored size: 1.16 KB

Contents

# PRIVATE CLASS: do not use directly
class postgresql::repo::yum_postgresql_org inherits postgresql::repo {
  $version_parts   = split($version, '[.]')
  $package_version = "${version_parts[0]}${version_parts[1]}"
  $gpg_key_path    = "/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}"

  if ($ensure == 'present' or $ensure == true) {
    file { $gpg_key_path:
      source => 'puppet:///modules/postgresql/RPM-GPG-KEY-PGDG',
      before => Yumrepo['yum.postgresql.org']
    }

    if($::operatingsystem == 'Fedora') {
      $label1 = 'fedora'
      $label2 = $label1
    } else {
      $label1 = 'redhat'
      $label2 = 'rhel'
    }

    yumrepo { 'yum.postgresql.org':
      descr    => "PostgreSQL ${version} \$releasever - \$basearch",
      baseurl  => "http://yum.postgresql.org/${version}/${label1}/${label2}-\$releasever-\$basearch",
      enabled  => 1,
      gpgcheck => 1,
      gpgkey   => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}",
    }

    Yumrepo['yum.postgresql.org'] -> Package<|tag == 'postgresql'|>
  } else {
    yumrepo { 'yum.postgresql.org':
      enabled => absent,
    }->
    file { $gpg_key_path:
      ensure => absent,
    }
  }
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.6.0 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.5.2 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.5.1 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.5.0 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.4.1 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.4.0 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.3.3 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.3.2 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.3.1 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.3.0 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.2.1 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.2.0 modules/postgresql/manifests/repo/yum_postgresql_org.pp
freighthop-0.1.0 modules/postgresql/manifests/repo/yum_postgresql_org.pp