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:
Alex Vandiver 2020-06-11 19:25:26 -07:00 committed by Tim Abbott
parent 16c4cea951
commit 9fd7a026ad
9 changed files with 9 additions and 9 deletions

View File

@ -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'

View File

@ -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:

View 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)

View 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 = '/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)

View 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 = '/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)

View 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 = '/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)

View 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 = '/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)

View 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 = '/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)

View 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 = '/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)