2012-12-03 08:06:36 +01:00
|
|
|
class postgresql::package_source::yum_postgresql_org(
|
|
|
|
$version
|
|
|
|
) {
|
|
|
|
|
|
|
|
$version_parts = split($version, '[.]')
|
|
|
|
$package_version = "${version_parts[0]}${version_parts[1]}"
|
|
|
|
|
|
|
|
file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}":
|
|
|
|
source => "puppet:///modules/postgresql_tests/RPM-GPG-KEY-PGDG-${package_version}"
|
|
|
|
} ->
|
|
|
|
|
|
|
|
yumrepo { "yum.postgresql.org":
|
|
|
|
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}",
|
|
|
|
}
|
|
|
|
|
2012-12-04 22:47:49 +01:00
|
|
|
Yumrepo["yum.postgresql.org"] -> Package<|tag == 'postgresql'|>
|
|
|
|
|
|
|
|
}
|