Skip to content

Commit 0404dcd

Browse files
committed
Steps involved in switching back to Xapian after Elastic for some time.
1 parent 9f6f3a1 commit 0404dcd

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

defaults/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ __mailman3_django_config_default:
264264
server_email: "{{ mailman3_site_owner }}"
265265
# compress_offline: true
266266
# socialaccount_providers: {}
267-
# haystack_engine: xapian_backend.XapianEngin"
267+
# haystack_engine: xapian_backend.XapianEngine" # or, for example, haystack_engine: haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine
268268
# debug: false
269269

270270
# WSGI server to install when installing with pip, currently only gunicorn is supported by this role. The Mailman 3
@@ -369,6 +369,7 @@ __mailman3_pip_packages:
369369
- environs
370370
- "{{ mailman3_python_wsgi_package }}"
371371
- django-pylibmc==0.6.1
372+
- xapian-haystack
372373

373374
# Packages to install from PyPI if using the pip install method. Automatically includes libsass if mailman3_use_pysassc
374375
# is enabled.
@@ -387,6 +388,8 @@ mailman3_packages:
387388
# sassc if mailman3_use_pysassc is not enabled.
388389
__mailman3_system_dependency_packages:
389390
debian:
391+
- build-essential
392+
- python3-dev
390393
- acl
391394
- python3
392395
- python3-venv
@@ -474,7 +477,6 @@ mailman3_database_list:
474477
password: mypassword
475478
subnet: "0.0.0.0/0"
476479

477-
elasticsearch_install: true
478480
elasticsearch_version: '7.x'
479481
elasticsearch_network_host: "0.0.0.0"
480482
elasticsearch_http_port: 9200

tasks/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414
- name: Install Elasticsearch
1515
ansible.builtin.include_tasks: elasticsearch.yml
16-
when: elasticsearch_install
16+
when:
17+
- "'elasticsearch' in __mailman3_django_config_merged.haystack_engine"
18+
- ansible_os_family == "Debian"
1719

1820
- name: Install postfix
1921
ansible.builtin.include_tasks: postfix.yml

0 commit comments

Comments
 (0)