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.
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.
10 # For examples, see the files in the `tests` directory; in particular,
11 # `/server-yum-postgresql-org.pp`.
16 # The postgresql version to install. If not specified, the
17 # module will use whatever version is the default for your
19 # [*manage_package_repo*]
20 # This determines whether or not the module should
21 # attempt to manage the postgres package repository for your
22 # distro. Defaults to `false`, but if set to `true`, it can
23 # be used to set up the official postgres yum/apt package
24 # repositories for you.
26 # This setting is only used if `manage_package_repo` is
27 # set to `true`. It determines which package repository should
28 # be used to install the postgres packages. Currently supported
29 # values include `yum.postgresql.org`.
31 # This setting defines the default locale for initdb and createdb
32 # commands. This default to 'undef' which is effectively 'C'.
34 # Sets the default charset to be used for initdb and createdb.
37 # This setting can be used to override the default postgresql
38 # data directory for the target platform. If not specified, the
39 # module will use whatever directory is the default for your
42 # This setting can be used to override the default postgresql
43 # configuration directory for the target platform. If not
44 # specified, the module will use whatever directory is the
45 # default for your OS distro.
47 # This setting can be used to override the default postgresql
48 # binaries directory for the target platform. If not
49 # specified, the module will use whatever directory is the
50 # default for your OS distro.
51 # [*client_package_name*]
52 # This setting can be used to override the default
53 # postgresql client package name. If not specified, the module
54 # will use whatever package name is the default for your
56 # [*server_package_name*]
57 # This setting can be used to override the default
58 # postgresql server package name. If not specified, the module
59 # will use whatever package name is the default for your
61 # [*contrib_package_name*]
62 # This setting can be used to override the default
63 # postgresql contrib package name. If not specified, the module
64 # will use whatever package name is the default for your
66 # [*devel_package_name*]
67 # This setting can be used to override the default
68 # postgresql devel package name. If not specified, the module
69 # will use whatever package name is the default for your
71 # [*java_package_name*]
72 # This setting can be used to override the default
73 # postgresql java package name. If not specified, the module
74 # will use whatever package name is the default for your
77 # This setting can be used to override the default
78 # postgresql service name. If not specified, the module
79 # will use whatever service name is the default for your
82 # This setting can be used to override the default
83 # postgresql super user and owner of postgresql related files
84 # in the file system. If not specified, the module will use
85 # the user name 'postgres'.
87 # This setting can be used to override the default
88 # postgresql user group to be used for related files
89 # in the file system. If not specified, the module will use
90 # the group name 'postgres'.
92 # This setting can be used to explicitly call the initdb
93 # operation after server package is installed and before
94 # the postgresql service is started. If not specified, the
95 # module will decide whether to call initdb or not depending
100 # class { 'postgresql':
102 # manage_package_repo => true,
107 $version = $::postgres_default_version,
108 $manage_package_repo = false,
109 $package_source = undef,
115 $client_package_name = undef,
116 $server_package_name = undef,
117 $contrib_package_name = undef,
118 $devel_package_name = undef,
119 $java_package_name = undef,
120 $service_name = undef,
126 class { 'postgresql::params':
128 manage_package_repo => $manage_package_repo,
129 package_source => $package_source,
132 custom_datadir => $datadir,
133 custom_confdir => $confdir,
134 custom_bindir => $bindir,
135 custom_client_package_name => $client_package_name,
136 custom_server_package_name => $server_package_name,
137 custom_contrib_package_name => $contrib_package_name,
138 custom_devel_package_name => $devel_package_name,
139 custom_java_package_name => $java_package_name,
140 custom_service_name => $service_name,
141 custom_user => $user,
142 custom_group => $group,
143 run_initdb => $run_initdb,