2012-12-03 08:06:36 +01:00
|
|
|
class postgresql::package_source::yum_postgresql_org(
|
2013-02-15 11:23:18 +01:00
|
|
|
$version
|
2012-12-03 08:06:36 +01:00
|
|
|
) {
|
|
|
|
|
|
|
|
$version_parts = split($version, '[.]')
|
|
|
|
$package_version = "${version_parts[0]}${version_parts[1]}"
|
|
|
|
|
|
|
|
file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}":
|
2013-02-06 15:29:21 +01:00
|
|
|
source => 'puppet:///modules/postgresql/RPM-GPG-KEY-PGDG'
|
2012-12-03 08:06:36 +01:00
|
|
|
} ->
|
|
|
|
|
2013-02-06 15:29:21 +01:00
|
|
|
yumrepo { 'yum.postgresql.org':
|
2012-12-03 08:06:36 +01:00
|
|
|
descr => "PostgreSQL ${version} \$releasever - \$basearch",
|
|
|
|
baseurl => "http://yum.postgresql.org/${version}/redhat/rhel-\$releasever-\$basearch",
|
|
|
|
enabled => 1,
|
|
|
|
gpgcheck => 1,
|
|
|
|
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}",
|
|
|
|
}
|
|
|
|
|
2013-02-06 15:29:21 +01:00
|
|
|
Yumrepo['yum.postgresql.org'] -> Package<|tag == 'postgresql'|>
|
2012-12-04 22:47:49 +01:00
|
|
|
|
|
|
|
}
|