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: Link postgres dict symlinks to hunspell files on CentOS.

rht89af2f381d14
diff --git a/puppet/zulip/manifests/postgres_appdb_base.pp b/puppet/zulip/manifests/postgres_appdb_base.pp
index 1c713e6e9d3..4eb8864884c 100644
--- a/puppet/zulip/manifests/postgres_appdb_base.pp
+++ b/puppet/zulip/manifests/postgres_appdb_base.pp
@@ -19,6 +19,8 @@ class zulip::postgres_appdb_base {
$pgroonga_setup_sql_path = "${postgres_sharedir}/pgroonga_setup.sql"
$setup_system_deps = 'setup_apt_repo'
$postgres_restart = "pg_ctlcluster ${zulip::base::postgres_version} main restart"
+ $postgres_dict_dict = '/var/cache/postgresql/dicts/en_us.dict'
+ $postgres_dict_affix = '/var/cache/postgresql/dicts/en_us.affix'
}
'redhat': {
include zulip::yum_repository
@@ -34,6 +36,10 @@ class zulip::postgres_appdb_base {
$pgroonga_setup_sql_path = "${postgres_sharedir}/pgroonga_setup.sql"
$setup_system_deps = 'setup_yum_repo'
$postgres_restart = "systemctl restart postgresql-${zulip::base::postgres_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'
}
default: {
fail('osfamily not supported')
@@ -48,12 +54,12 @@ class zulip::postgres_appdb_base {
file { "${tsearch_datadir}/en_us.dict":
ensure => 'link',
require => Package[$postgresql],
- target => '/var/cache/postgresql/dicts/en_us.dict', # TODO check cache dir on CentOS
+ target => $postgres_dict_dict,
}
file { "${tsearch_datadir}/en_us.affix":
ensure => 'link',
require => Package[$postgresql],
- target => '/var/cache/postgresql/dicts/en_us.affix', # TODO check cache dir on CentOS
+ target => $postgres_dict_affix,
}
file { "${tsearch_datadir}/zulip_english.stop":