mirror of https://github.com/zulip/zulip.git
puppet: Pull postgres data directory into postgres_appdb_base.
The `pg_datadir` variable was only used, and accurate, for CentOS. Pull it out into `postgres_app_base`, broaden it to being accurate on Debian-based systems as well, and use it consistently in the templates.
This commit is contained in:
parent
16c4cea951
commit
9fd7a026ad
|
@ -10,6 +10,7 @@ class zulip::postgres_appdb_base {
|
|||
$postgresql = "postgresql-${zulip::base::postgres_version}"
|
||||
$postgres_sharedir = "/usr/share/postgresql/${zulip::base::postgres_version}"
|
||||
$postgres_confdir = "/etc/postgresql/${zulip::base::postgres_version}/main"
|
||||
$postgres_datadir = "/var/lib/postgresql/${zulip::base::postgres_version}/main"
|
||||
$tsearch_datadir = "${postgres_sharedir}/tsearch_data"
|
||||
$pgroonga_setup_sql_path = "${postgres_sharedir}/pgroonga_setup.sql"
|
||||
$setup_system_deps = 'setup_apt_repo'
|
||||
|
@ -20,6 +21,7 @@ class zulip::postgres_appdb_base {
|
|||
$postgresql = "postgresql${zulip::base::postgres_version}"
|
||||
$postgres_sharedir = "/usr/pgsql-${zulip::base::postgres_version}/share"
|
||||
$postgres_confdir = "/var/lib/pgsql/${zulip::base::postgres_version}/data"
|
||||
$postgres_datadir = "/var/lib/pgsql/${zulip::base::postgres_version}/data"
|
||||
$tsearch_datadir = "${postgres_sharedir}/tsearch_data/"
|
||||
$pgroonga_setup_sql_path = "${postgres_sharedir}/pgroonga_setup.sql"
|
||||
$setup_system_deps = 'setup_yum_repo'
|
||||
|
|
|
@ -17,8 +17,6 @@ class zulip::postgres_appdb_tuned {
|
|||
$ssl_key_file = zulipconf('postgresql', 'ssl_key_file', undef)
|
||||
$ssl_ca_file = zulipconf('postgresql', 'ssl_ca_file', undef)
|
||||
|
||||
# Only used in CentOS for now
|
||||
$pg_datadir = "/var/lib/pgsql/${zulip::base::postgres_version}/data"
|
||||
|
||||
$postgres_conf_file = "${zulip::postgres_appdb_base::postgres_confdir}/postgresql.conf"
|
||||
file { $postgres_conf_file:
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# The default values of these variables are driven from the -D command-line
|
||||
# option or PGDATA environment variable, represented here as ConfigDir.
|
||||
|
||||
data_directory = '<%= scope["zulip::postgres_appdb_tuned::pg_datadir"] %>' # use data in another directory
|
||||
data_directory = '<%= scope["zulip::postgres_appdb_base::postgres_datadir"] %>' # use data in another directory
|
||||
# (change requires restart)
|
||||
hba_file = '<%= scope["zulip::postgres_appdb_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
|
||||
# (change requires restart)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# The default values of these variables are driven from the -D command-line
|
||||
# option or PGDATA environment variable, represented here as ConfigDir.
|
||||
|
||||
data_directory = '/var/lib/postgresql/<%= scope["zulip::base::postgres_version"] %>/main' # use data in another directory
|
||||
data_directory = '<%= scope["zulip::postgres_appdb_base::postgres_datadir"] %>' # use data in another directory
|
||||
# (change requires restart)
|
||||
hba_file = '<%= scope["zulip::postgres_appdb_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
|
||||
# (change requires restart)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# The default values of these variables are driven from the -D command-line
|
||||
# option or PGDATA environment variable, represented here as ConfigDir.
|
||||
|
||||
data_directory = '/var/lib/postgresql/<%= scope["zulip::base::postgres_version"] %>/main' # use data in another directory
|
||||
data_directory = '<%= scope["zulip::postgres_appdb_base::postgres_datadir"] %>' # use data in another directory
|
||||
# (change requires restart)
|
||||
hba_file = '<%= scope["zulip::postgres_appdb_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
|
||||
# (change requires restart)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# The default values of these variables are driven from the -D command-line
|
||||
# option or PGDATA environment variable, represented here as ConfigDir.
|
||||
|
||||
data_directory = '/var/lib/postgresql/<%= scope["zulip::base::postgres_version"] %>/main' # use data in another directory
|
||||
data_directory = '<%= scope["zulip::postgres_appdb_base::postgres_datadir"] %>' # use data in another directory
|
||||
# (change requires restart)
|
||||
hba_file = '<%= scope["zulip::postgres_appdb_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
|
||||
# (change requires restart)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# The default values of these variables are driven from the -D command-line
|
||||
# option or PGDATA environment variable, represented here as ConfigDir.
|
||||
|
||||
data_directory = '/var/lib/postgresql/<%= scope["zulip::base::postgres_version"] %>/main' # use data in another directory
|
||||
data_directory = '<%= scope["zulip::postgres_appdb_base::postgres_datadir"] %>' # use data in another directory
|
||||
# (change requires restart)
|
||||
hba_file = '<%= scope["zulip::postgres_appdb_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
|
||||
# (change requires restart)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# The default values of these variables are driven from the -D command-line
|
||||
# option or PGDATA environment variable, represented here as ConfigDir.
|
||||
|
||||
data_directory = '/var/lib/postgresql/<%= scope["zulip::base::postgres_version"] %>/main' # use data in another directory
|
||||
data_directory = '<%= scope["zulip::postgres_appdb_base::postgres_datadir"] %>' # use data in another directory
|
||||
# (change requires restart)
|
||||
hba_file = '<%= scope["zulip::postgres_appdb_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
|
||||
# (change requires restart)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# The default values of these variables are driven from the -D command-line
|
||||
# option or PGDATA environment variable, represented here as ConfigDir.
|
||||
|
||||
data_directory = '/var/lib/postgresql/<%= scope["zulip::base::postgres_version"] %>/main' # use data in another directory
|
||||
data_directory = '<%= scope["zulip::postgres_appdb_base::postgres_datadir"] %>' # use data in another directory
|
||||
# (change requires restart)
|
||||
hba_file = '<%= scope["zulip::postgres_appdb_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
|
||||
# (change requires restart)
|
||||
|
|
Loading…
Reference in New Issue