newer pg module
[mirror/dsa-puppet.git] / 3rdparty / modules / postgresql / manifests / repo.pp
diff --git a/3rdparty/modules/postgresql/manifests/repo.pp b/3rdparty/modules/postgresql/manifests/repo.pp
new file mode 100644 (file)
index 0000000..5ec63c7
--- /dev/null
@@ -0,0 +1,23 @@
+# PRIVATE CLASS: do not use directly
+class postgresql::repo (
+  $version = undef,
+  $proxy = undef,
+  $baseurl = undef,
+) {
+  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")
+    }
+  }
+}