59c1cbfbf8
This is a very very large change to the module. It started out as a fix to add postgresl::server::config_entry, and quickly became a rewrite to fix a lot of ordering issues inherent in the API. Since this changes the Public API it is considered a backwards compatible change. See the upgrading guide in README.md for more details as to what has been modified in this patch. Signed-off-by: Ken Barber <ken@bob.sh>
24 lines
809 B
Puppet
24 lines
809 B
Puppet
# PRIVATE CLASS: do not use directly
|
|
class postgresql::repo (
|
|
$ensure = 'present',
|
|
$version = undef
|
|
) inherits postgresql::params {
|
|
if $ensure == 'present' or $ensure == true {
|
|
case $::osfamily {
|
|
'RedHat', 'Linux': {
|
|
if $version == undef {
|
|
fail("The parameter 'version' for 'postgresql::repo' is undefined. You must always define it when osfamily == Redhat or Linux")
|
|
}
|
|
class { 'postgresql::repo::yum_postgresql_org': }
|
|
}
|
|
|
|
'Debian': {
|
|
class { 'postgresql::repo::apt_postgresql_org': }
|
|
}
|
|
|
|
default: {
|
|
fail("Unsupported managed repository for osfamily: ${::osfamily}, operatingsystem: ${::operatingsystem}, module ${module_name} currently only supports managing repos for osfamily RedHat and Debian")
|
|
}
|
|
}
|
|
}
|
|
}
|