2013-08-27 22:43:47 +02:00
|
|
|
# This installs a PostgreSQL server. See README.md for more details.
|
2012-06-08 22:37:21 +02:00
|
|
|
class postgresql::server (
|
2013-08-27 22:43:47 +02:00
|
|
|
$postgres_password = undef,
|
2012-06-08 22:37:21 +02:00
|
|
|
|
2013-08-27 22:43:47 +02:00
|
|
|
$package_name = $postgresql::params::server_package_name,
|
2014-02-14 21:32:57 +01:00
|
|
|
$client_package_name = $postgresql::params::client_package_name,
|
2014-07-02 16:45:07 +02:00
|
|
|
$package_ensure = $postgresql::params::package_ensure,
|
2012-12-03 08:06:36 +01:00
|
|
|
|
2013-09-19 17:30:15 +02:00
|
|
|
$plperl_package_name = $postgresql::params::plperl_package_name,
|
2015-03-04 12:58:15 +01:00
|
|
|
$plpython_package_name = $postgresql::params::plpython_package_name,
|
2013-09-19 17:30:15 +02:00
|
|
|
|
2014-05-08 22:43:22 +02:00
|
|
|
$service_ensure = $postgresql::params::service_ensure,
|
2014-07-02 16:45:07 +02:00
|
|
|
$service_enable = $postgresql::params::service_enable,
|
2014-12-04 14:26:37 +01:00
|
|
|
$service_manage = $postgresql::params::service_manage,
|
2013-08-27 22:43:47 +02:00
|
|
|
$service_name = $postgresql::params::service_name,
|
|
|
|
$service_provider = $postgresql::params::service_provider,
|
2014-09-11 01:29:48 +02:00
|
|
|
$service_reload = $postgresql::params::service_reload,
|
2013-08-27 22:43:47 +02:00
|
|
|
$service_status = $postgresql::params::service_status,
|
2013-10-27 02:50:05 +02:00
|
|
|
$default_database = $postgresql::params::default_database,
|
2012-06-08 23:00:24 +02:00
|
|
|
|
2013-08-27 22:43:47 +02:00
|
|
|
$listen_addresses = $postgresql::params::listen_addresses,
|
2014-04-17 21:09:07 +02:00
|
|
|
$port = $postgresql::params::port,
|
2013-08-27 22:43:47 +02:00
|
|
|
$ip_mask_deny_postgres_user = $postgresql::params::ip_mask_deny_postgres_user,
|
|
|
|
$ip_mask_allow_all_users = $postgresql::params::ip_mask_allow_all_users,
|
|
|
|
$ipv4acls = $postgresql::params::ipv4acls,
|
|
|
|
$ipv6acls = $postgresql::params::ipv6acls,
|
2013-02-15 18:14:15 +01:00
|
|
|
|
2013-08-27 22:43:47 +02:00
|
|
|
$initdb_path = $postgresql::params::initdb_path,
|
|
|
|
$createdb_path = $postgresql::params::createdb_path,
|
|
|
|
$psql_path = $postgresql::params::psql_path,
|
|
|
|
$pg_hba_conf_path = $postgresql::params::pg_hba_conf_path,
|
2014-07-24 22:04:02 +02:00
|
|
|
$pg_ident_conf_path = $postgresql::params::pg_ident_conf_path,
|
2013-08-27 22:43:47 +02:00
|
|
|
$postgresql_conf_path = $postgresql::params::postgresql_conf_path,
|
2015-02-07 07:28:54 +01:00
|
|
|
$recovery_conf_path = $postgresql::params::recovery_conf_path,
|
2012-06-08 22:37:21 +02:00
|
|
|
|
2013-09-03 06:55:30 +02:00
|
|
|
$datadir = $postgresql::params::datadir,
|
2013-09-25 19:00:24 +02:00
|
|
|
$xlogdir = $postgresql::params::xlogdir,
|
2014-12-09 23:48:45 +01:00
|
|
|
$logdir = $postgresql::params::logdir,
|
2013-09-03 06:55:30 +02:00
|
|
|
|
2013-08-27 22:43:47 +02:00
|
|
|
$pg_hba_conf_defaults = $postgresql::params::pg_hba_conf_defaults,
|
2013-08-27 01:18:46 +02:00
|
|
|
|
2013-08-27 22:43:47 +02:00
|
|
|
$user = $postgresql::params::user,
|
|
|
|
$group = $postgresql::params::group,
|
2013-08-27 01:18:46 +02:00
|
|
|
|
2013-08-27 22:43:47 +02:00
|
|
|
$needs_initdb = $postgresql::params::needs_initdb,
|
2012-11-20 21:52:44 +01:00
|
|
|
|
2013-08-27 22:43:47 +02:00
|
|
|
$encoding = $postgresql::params::encoding,
|
|
|
|
$locale = $postgresql::params::locale,
|
2012-06-08 22:37:21 +02:00
|
|
|
|
2013-10-02 14:43:21 +02:00
|
|
|
$manage_pg_hba_conf = $postgresql::params::manage_pg_hba_conf,
|
2014-07-24 22:04:02 +02:00
|
|
|
$manage_pg_ident_conf = $postgresql::params::manage_pg_ident_conf,
|
2015-02-07 07:28:54 +01:00
|
|
|
$manage_recovery_conf = $postgresql::params::manage_recovery_conf,
|
2014-04-26 01:44:30 +02:00
|
|
|
|
|
|
|
#Deprecated
|
2014-08-18 11:26:06 +02:00
|
|
|
$version = undef,
|
2013-08-27 22:43:47 +02:00
|
|
|
) inherits postgresql::params {
|
|
|
|
$pg = 'postgresql::server'
|
|
|
|
|
2014-06-03 19:21:45 +02:00
|
|
|
if $version != undef {
|
2014-04-26 01:44:30 +02:00
|
|
|
warning('Passing "version" to postgresql::server is deprecated; please use postgresql::globals instead.')
|
2014-06-03 19:21:45 +02:00
|
|
|
$_version = $version
|
2014-08-18 11:26:06 +02:00
|
|
|
} else {
|
|
|
|
$_version = $postgresql::params::version
|
2014-04-26 01:44:30 +02:00
|
|
|
}
|
|
|
|
|
2015-03-05 01:34:52 +01:00
|
|
|
if $createdb_path != undef{
|
|
|
|
warning('Passing "createdb_path" to postgresql::server is deprecated, it can be removed safely for the same behaviour')
|
|
|
|
}
|
|
|
|
|
2014-07-02 16:45:07 +02:00
|
|
|
# Reload has its own ordering, specified by other defines
|
|
|
|
class { "${pg}::reload": require => Class["${pg}::install"] }
|
|
|
|
|
|
|
|
anchor { "${pg}::start": }->
|
|
|
|
class { "${pg}::install": }->
|
|
|
|
class { "${pg}::initdb": }->
|
|
|
|
class { "${pg}::config": }->
|
|
|
|
class { "${pg}::service": }->
|
|
|
|
class { "${pg}::passwd": }->
|
|
|
|
anchor { "${pg}::end": }
|
2012-06-08 22:37:21 +02:00
|
|
|
}
|