module-postgresql/tests/server-yum-postgresql-org.pp
Chris Price 228e5c5337 Cleanup and move control of version into params
Thanks to some tricks I learned from Nan Liu and Dan Bode, I was
able to figure out a way to move all of the new version-related stuff
back into the params class, and clean up some of the if/_real stuff.

Basic tests for centos6 + pg 9.2 are passing.
2012-12-04 14:12:41 -08:00

23 lines
941 B
Puppet

# This manifest shows an example of how you can use a newer version of
# postgres from yum.postgresql.org, rather than your system's
# default version.
#
# Note that it is important that you use the '->', or a
# before/require metaparameter to make sure that the `params`
# class is evaluated before any of the other classes in the module.
#
# Also note that this example includes automatic management of the yumrepo
# resource. If you'd prefer to manage the repo yourself, simply pass 'false'
# or omit the 'manage_repo' parameter--it defaults to 'false'. You will still
# need to use the 'params' class to specify the postgres version
# number, though, in order for the other classes to be able to find the
# correct paths to the postgres dirs.
class { "postgresql::params":
version => '9.2',
manage_package_repo => true,
package_source => 'yum.postgresql.org',
} ->
class { "postgresql::server": }