Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppet: Rename postgres_ variables to postgresql_.

Alex Vandiver45f6c79c4a7a
diff --git a/puppet/zulip/manifests/postgresql_base.pp b/puppet/zulip/manifests/postgresql_base.pp
index 021bd6e6b26..e4965ddadbf 100644
--- a/puppet/zulip/manifests/postgresql_base.pp
+++ b/puppet/zulip/manifests/postgresql_base.pp
@@ -6,37 +6,37 @@ class zulip::postgresql_base {
case $::osfamily {
'debian': {
$postgresql = "postgresql-${zulip::postgresql_common::version}"
- $postgres_sharedir = "/usr/share/postgresql/${zulip::postgresql_common::version}"
- $postgres_confdirs = [
+ $postgresql_sharedir = "/usr/share/postgresql/${zulip::postgresql_common::version}"
+ $postgresql_confdirs = [
"/etc/postgresql/${zulip::postgresql_common::version}",
"/etc/postgresql/${zulip::postgresql_common::version}/main",
]
- $postgres_confdir = $postgres_confdirs[-1]
- $postgres_datadir = "/var/lib/postgresql/${zulip::postgresql_common::version}/main"
- $tsearch_datadir = "${postgres_sharedir}/tsearch_data"
- $pgroonga_setup_sql_path = "${postgres_sharedir}/pgroonga_setup.sql"
+ $postgresql_confdir = $postgresql_confdirs[-1]
+ $postgresql_datadir = "/var/lib/postgresql/${zulip::postgresql_common::version}/main"
+ $tsearch_datadir = "${postgresql_sharedir}/tsearch_data"
+ $pgroonga_setup_sql_path = "${postgresql_sharedir}/pgroonga_setup.sql"
$setup_system_deps = 'setup_apt_repo'
- $postgres_restart = "pg_ctlcluster ${zulip::postgresql_common::version} main restart"
- $postgres_dict_dict = '/var/cache/postgresql/dicts/en_us.dict'
- $postgres_dict_affix = '/var/cache/postgresql/dicts/en_us.affix'
+ $postgresql_restart = "pg_ctlcluster ${zulip::postgresql_common::version} main restart"
+ $postgresql_dict_dict = '/var/cache/postgresql/dicts/en_us.dict'
+ $postgresql_dict_affix = '/var/cache/postgresql/dicts/en_us.affix'
}
'redhat': {
$postgresql = "postgresql${zulip::postgresql_common::version}"
- $postgres_sharedir = "/usr/pgsql-${zulip::postgresql_common::version}/share"
- $postgres_confdirs = [
+ $postgresql_sharedir = "/usr/pgsql-${zulip::postgresql_common::version}/share"
+ $postgresql_confdirs = [
"/var/lib/pgsql/${zulip::postgresql_common::version}",
"/var/lib/pgsql/${zulip::postgresql_common::version}/data",
]
- $postgres_confdir = $postgres_confdirs[-1]
- $postgres_datadir = "/var/lib/pgsql/${zulip::postgresql_common::version}/data"
- $tsearch_datadir = "${postgres_sharedir}/tsearch_data/"
- $pgroonga_setup_sql_path = "${postgres_sharedir}/pgroonga_setup.sql"
+ $postgresql_confdir = $postgresql_confdirs[-1]
+ $postgresql_datadir = "/var/lib/pgsql/${zulip::postgresql_common::version}/data"
+ $tsearch_datadir = "${postgresql_sharedir}/tsearch_data/"
+ $pgroonga_setup_sql_path = "${postgresql_sharedir}/pgroonga_setup.sql"
$setup_system_deps = 'setup_yum_repo'
- $postgres_restart = "systemctl restart postgresql-${zulip::postgresql_common::version}"
+ $postgresql_restart = "systemctl restart postgresql-${zulip::postgresql_common::version}"
# TODO Since we can't find the Postgres dicts directory on CentOS yet, we
# link directly to the hunspell directory.
- $postgres_dict_dict = '/usr/share/myspell/en_US.dic'
- $postgres_dict_affix = '/usr/share/myspell/en_US.aff'
+ $postgresql_dict_dict = '/usr/share/myspell/en_US.dic'
+ $postgresql_dict_affix = '/usr/share/myspell/en_US.aff'
}
default: {
fail('osfamily not supported')
@@ -46,12 +46,12 @@ class zulip::postgresql_base {
file { "${tsearch_datadir}/en_us.dict":
ensure => 'link',
require => Package[$postgresql],
- target => $postgres_dict_dict,
+ target => $postgresql_dict_dict,
}
file { "${tsearch_datadir}/en_us.affix":
ensure => 'link',
require => Package[$postgresql],
- target => $postgres_dict_affix,
+ target => $postgresql_dict_affix,
}
file { "${tsearch_datadir}/zulip_english.stop":
diff --git a/puppet/zulip/manifests/postgresql_common.pp b/puppet/zulip/manifests/postgresql_common.pp
index 28371e183ef..d257149e4ac 100644
--- a/puppet/zulip/manifests/postgresql_common.pp
+++ b/puppet/zulip/manifests/postgresql_common.pp
@@ -3,7 +3,7 @@ class zulip::postgresql_common {
case $::osfamily {
'debian': {
$postgresql = "postgresql-${version}"
- $postgres_packages = [
+ $postgresql_packages = [
# The database itself
$postgresql,
# tools for database monitoring; formerly ptop
@@ -17,14 +17,14 @@ class zulip::postgresql_common {
# Python modules used in our monitoring/worker threads
'python3-dateutil', # TODO: use a virtualenv instead
]
- $postgres_user_reqs = [
+ $postgresql_user_reqs = [
Package[$postgresql],
Package['ssl-cert'],
]
}
'redhat': {
$postgresql = "postgresql${version}"
- $postgres_packages = [
+ $postgresql_packages = [
$postgresql,
"${postgresql}-server",
"${postgresql}-devel",
@@ -49,7 +49,7 @@ class zulip::postgresql_common {
owner => 'root',
group => 'ssl-cert',
}
- $postgres_user_reqs = [
+ $postgresql_user_reqs = [
Package[$postgresql],
Group['ssl-cert'],
]
@@ -59,7 +59,7 @@ class zulip::postgresql_common {
}
}
- zulip::safepackage { $postgres_packages: ensure => 'installed' }
+ zulip::safepackage { $postgresql_packages: ensure => 'installed' }
if $::osfamily == 'debian' {
# The logrotate file only created in debian-based systems
@@ -75,7 +75,7 @@ class zulip::postgresql_common {
@user { 'postgres':
groups => ['ssl-cert'],
membership => minimum,
- require => $postgres_user_reqs,
+ require => $postgresql_user_reqs,
}
User <| title == postgres |> { groups +> 'zulip' }
}
diff --git a/puppet/zulip/manifests/profile/postgresql.pp b/puppet/zulip/manifests/profile/postgresql.pp
index e504536bfec..9ed1ef63c84 100644
--- a/puppet/zulip/manifests/profile/postgresql.pp
+++ b/puppet/zulip/manifests/profile/postgresql.pp
@@ -17,14 +17,14 @@ class zulip::profile::postgresql {
$ssl_key_file = zulipconf('postgresql', 'ssl_key_file', undef)
$ssl_ca_file = zulipconf('postgresql', 'ssl_ca_file', undef)
- file { $zulip::postgresql_base::postgres_confdirs:
+ file { $zulip::postgresql_base::postgresql_confdirs:
ensure => directory,
owner => 'postgres',
group => 'postgres',
}
- $postgres_conf_file = "${zulip::postgresql_base::postgres_confdir}/postgresql.conf"
- file { $postgres_conf_file:
+ $postgresql_conf_file = "${zulip::postgresql_base::postgresql_confdir}/postgresql.conf"
+ file { $postgresql_conf_file:
ensure => file,
require => Package[$zulip::postgresql_base::postgresql],
owner => 'postgres',
@@ -33,9 +33,9 @@ class zulip::profile::postgresql {
content => template("zulip/postgresql/${zulip::postgresql_common::version}/postgresql.conf.template.erb"),
}
- exec { $zulip::postgresql_base::postgres_restart:
+ exec { $zulip::postgresql_base::postgresql_restart:
require => Package[$zulip::postgresql_base::postgresql],
refreshonly => true,
- subscribe => [ File[$postgres_conf_file] ],
+ subscribe => [ File[$postgresql_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.erb
index 236931bd178..593bcfa5df1 100644
--- a/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb
+++ b/puppet/zulip/templates/postgresql/10/postgresql.conf.centos.template.erb
@@ -38,11 +38,11 @@
# 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::postgresql_base::postgres_datadir"] %>' # use data in another directory
+data_directory = '<%= scope["zulip::postgresql_base::postgresql_datadir"] %>' # use data in another directory
# (change requires restart)
-hba_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
+hba_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_hba.conf' # host-based authentication file
# (change requires restart)
-ident_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_ident.conf' # ident configuration file
+ident_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
diff --git a/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb
index e37c3775cb0..92da3397444 100644
--- a/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb
+++ b/puppet/zulip/templates/postgresql/10/postgresql.conf.template.erb
@@ -38,11 +38,11 @@
# 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::postgresql_base::postgres_datadir"] %>' # use data in another directory
+data_directory = '<%= scope["zulip::postgresql_base::postgresql_datadir"] %>' # use data in another directory
# (change requires restart)
-hba_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
+hba_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_hba.conf' # host-based authentication file
# (change requires restart)
-ident_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_ident.conf' # ident configuration file
+ident_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
diff --git a/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb
index e37c3775cb0..92da3397444 100644
--- a/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb
+++ b/puppet/zulip/templates/postgresql/11/postgresql.conf.template.erb
@@ -38,11 +38,11 @@
# 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::postgresql_base::postgres_datadir"] %>' # use data in another directory
+data_directory = '<%= scope["zulip::postgresql_base::postgresql_datadir"] %>' # use data in another directory
# (change requires restart)
-hba_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
+hba_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_hba.conf' # host-based authentication file
# (change requires restart)
-ident_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_ident.conf' # ident configuration file
+ident_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
diff --git a/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb
index 17011bfd799..a83a2dc16ed 100644
--- a/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb
+++ b/puppet/zulip/templates/postgresql/12/postgresql.conf.template.erb
@@ -38,11 +38,11 @@
# 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::postgresql_base::postgres_datadir"] %>' # use data in another directory
+data_directory = '<%= scope["zulip::postgresql_base::postgresql_datadir"] %>' # use data in another directory
# (change requires restart)
-hba_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
+hba_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_hba.conf' # host-based authentication file
# (change requires restart)
-ident_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_ident.conf' # ident configuration file
+ident_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
diff --git a/puppet/zulip/templates/postgresql/9.3/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/9.3/postgresql.conf.template.erb
index 5067d3b6889..0d76992c638 100644
--- a/puppet/zulip/templates/postgresql/9.3/postgresql.conf.template.erb
+++ b/puppet/zulip/templates/postgresql/9.3/postgresql.conf.template.erb
@@ -38,11 +38,11 @@
# 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::postgresql_base::postgres_datadir"] %>' # use data in another directory
+data_directory = '<%= scope["zulip::postgresql_base::postgresql_datadir"] %>' # use data in another directory
# (change requires restart)
-hba_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
+hba_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_hba.conf' # host-based authentication file
# (change requires restart)
-ident_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_ident.conf' # ident configuration file
+ident_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
diff --git a/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb
index c1f5c2376d7..bb1dc5ba1c4 100644
--- a/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb
+++ b/puppet/zulip/templates/postgresql/9.5/postgresql.conf.template.erb
@@ -38,11 +38,11 @@
# 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::postgresql_base::postgres_datadir"] %>' # use data in another directory
+data_directory = '<%= scope["zulip::postgresql_base::postgresql_datadir"] %>' # use data in another directory
# (change requires restart)
-hba_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
+hba_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_hba.conf' # host-based authentication file
# (change requires restart)
-ident_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_ident.conf' # ident configuration file
+ident_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
diff --git a/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb b/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb
index a47fa2da201..96789dd83f0 100644
--- a/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb
+++ b/puppet/zulip/templates/postgresql/9.6/postgresql.conf.template.erb
@@ -38,11 +38,11 @@
# 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::postgresql_base::postgres_datadir"] %>' # use data in another directory
+data_directory = '<%= scope["zulip::postgresql_base::postgresql_datadir"] %>' # use data in another directory
# (change requires restart)
-hba_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_hba.conf' # host-based authentication file
+hba_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_hba.conf' # host-based authentication file
# (change requires restart)
-ident_file = '<%= scope["zulip::postgresql_base::postgres_confdir"] %>/pg_ident.conf' # ident configuration file
+ident_file = '<%= scope["zulip::postgresql_base::postgresql_confdir"] %>/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
diff --git a/puppet/zulip_ops/manifests/profile/nagios.pp b/puppet/zulip_ops/manifests/profile/nagios.pp
index edee54a18da..01fdbdb5429 100644
--- a/puppet/zulip_ops/manifests/profile/nagios.pp
+++ b/puppet/zulip_ops/manifests/profile/nagios.pp
@@ -24,8 +24,8 @@ class zulip_ops::profile::nagios {
$hosts_zmirrorp = split(zulipconf('nagios', 'hosts_zmirrorp', undef), ',')
$hosts_app_prod = split(zulipconf('nagios', 'hosts_app_prod', undef), ',')
$hosts_app_staging = split(zulipconf('nagios', 'hosts_app_staging', undef), ',')
- $hosts_postgres_primary = split(zulipconf('nagios', 'hosts_postgres_primary', undef), ',')
- $hosts_postgres_replica = split(zulipconf('nagios', 'hosts_postgres_replica', undef), ',')
+ $hosts_postgresql_primary = split(zulipconf('nagios', 'hosts_postgresql_primary', undef), ',')
+ $hosts_postgresql_replica = split(zulipconf('nagios', 'hosts_postgresql_replica', undef), ',')
$hosts_redis = split(zulipconf('nagios', 'hosts_redis', undef), ',')
$hosts_loadbalancer = split(zulipconf('nagios', 'hosts_loadbalancer', undef), ',')
$hosts_stats = split(zulipconf('nagios', 'hosts_stats', undef), ',')
diff --git a/puppet/zulip_ops/manifests/profile/postgresql.pp b/puppet/zulip_ops/manifests/profile/postgresql.pp
index a0bf9d85ef9..9dbe47b6a1e 100644
--- a/puppet/zulip_ops/manifests/profile/postgresql.pp
+++ b/puppet/zulip_ops/manifests/profile/postgresql.pp
@@ -31,7 +31,7 @@ class zulip_ops::profile::postgresql {
unless => 'test $(readlink /var/lib/postgresql) = "/srv/postgresql/" -a -d /srv/postgresql',
}
- file { "${zulip::postgresql_base::postgres_confdir}/pg_hba.conf":
+ file { "${zulip::postgresql_base::postgresql_confdir}/pg_hba.conf":
ensure => file,
require => Package["postgresql-${zulip::postgresql_common::version}"],
owner => 'postgres',
diff --git a/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb b/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
index 2825dfaf10f..d7aa398fa7d 100644
--- a/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
+++ b/puppet/zulip_ops/templates/nagios3/hosts.cfg.template.erb
@@ -58,7 +58,7 @@ define host{
}
<% end -%>
-<% @hosts_postgres_primary.each do |host| -%>
+<% @hosts_postgresql_primary.each do |host| -%>
define host{
use generic-host
host_name <%= host %>
@@ -68,7 +68,7 @@ define host{
}
<% end -%>
-<% @hosts_postgres_replica.each do |host| -%>
+<% @hosts_postgresql_replica.each do |host| -%>
define host{
use generic-host
host_name <%= host %>