init.pp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # == Class: postgresql
  2. #
  3. # This is a base class that can be used to modify catalog-wide settings relating
  4. # to the various types in class contained in the postgresql module.
  5. #
  6. # If you don't declare this class in your catalog, sensible defaults will
  7. # be used. However, if you choose to declare it, it needs to appear *before*
  8. # any other types or classes from the postgresql module.
  9. #
  10. # For examples, see the files in the `tests` directory; in particular,
  11. # `/server-yum-postgresql-org.pp`.
  12. #
  13. #
  14. # [*version*]
  15. # The postgresql version to install. If not specified, the
  16. # module will use whatever version is the default for your
  17. # OS distro.
  18. # [*manage_package_repo*]
  19. # This determines whether or not the module should
  20. # attempt to manage the postgres package repository for your
  21. # distro. Defaults to `false`, but if set to `true`, it can
  22. # be used to set up the official postgres yum/apt package
  23. # repositories for you.
  24. # [*package_source*]
  25. # This setting is only used if `manage_package_repo` is
  26. # set to `true`. It determines which package repository should
  27. # be used to install the postgres packages. Currently supported
  28. # values include `yum.postgresql.org`.
  29. #
  30. # [*locale*]
  31. # This setting defines the default locale for initdb and createdb
  32. # commands. This default to 'undef' which is effectively 'C'.
  33. # [*charset*]
  34. # Sets the default charset to be used for initdb and createdb.
  35. # Defaults to 'UTF8'.
  36. #
  37. # === Examples:
  38. #
  39. # class { 'postgresql':
  40. # version => '9.2',
  41. # manage_package_repo => true,
  42. # }
  43. #
  44. #
  45. class postgresql (
  46. $version = $::postgres_default_version,
  47. $manage_package_repo = false,
  48. $package_source = undef,
  49. $locale = undef,
  50. $charset = 'UTF8'
  51. ) {
  52. class { 'postgresql::params':
  53. version => $version,
  54. manage_package_repo => $manage_package_repo,
  55. package_source => $package_source,
  56. locale => $locale,
  57. charset => $charset,
  58. }
  59. }