Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppet: Pull postgres data directory into postgres_appdb_base.
Alex Vandiver9fd7a026ad55
diff --git a/puppet/zulip/manifests/postgres_appdb_base.pp b/puppet/zulip/manifests/postgres_appdb_base.ppindex 2a0b95d11e6..5186168dfa1 100644--- a/puppet/zulip/manifests/postgres_appdb_base.pp+++ b/puppet/zulip/manifests/postgres_appdb_base.pp@@ -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'diff --git a/puppet/zulip/manifests/postgres_appdb_tuned.pp b/puppet/zulip/manifests/postgres_appdb_tuned.ppindex aa50f86434a..d85ae50cfab 100644--- a/puppet/zulip/manifests/postgres_appdb_tuned.pp+++ b/puppet/zulip/manifests/postgres_appdb_tuned.pp@@ -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:diff --git a/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb b/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erbindex cfe5420e54b..82562450913 100644--- a/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb+++ b/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb@@ -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)diff --git a/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erbindex 50775ca7f34..2c71081a6d8 100644--- a/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb+++ b/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb@@ -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)diff --git a/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erbindex 50775ca7f34..2c71081a6d8 100644--- a/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb+++ b/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb@@ -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)diff --git a/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erbindex 04708bc7175..245008cf300 100644--- a/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb+++ b/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb@@ -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)diff --git a/puppet/zulip/templates/postgresql/9.3/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/9.3/postgresql.conf.template.erbindex 6d722e22c1d..a1c48be1103 100644--- a/puppet/zulip/templates/postgresql/9.3/postgresql.conf.template.erb+++ b/puppet/zulip/templates/postgresql/9.3/postgresql.conf.template.erb@@ -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)diff --git a/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erbindex 1765cc22717..4f2419c32a4 100644--- a/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb+++ b/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb@@ -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)diff --git a/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erbindex d9be00be43b..4bacaa257af 100644--- a/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb+++ b/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb@@ -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)