
This switch testing of lists.openstack.org to Focal and we make a CGI env var update to accomodate newer mailman. Specifically newer mailman's CGI scripts filter env vars that it will pass through. We were setting MAILMAN_SITE_DIR to vhost our mailman installs with apache2, but that doesn't pass the filter and is removed. HOST is passed through so we update our scripts, apache vhost configs, exim, and init scripts to use the HOST env var instead. Change-Id: I5c8c70c219669e37b7b75a61001a2b7f7bb0bb6c
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
# The bulk of this role can likely be replaced with:
|
|
# https://github.com/CCI-MOC/moc-ansible-mailman
|
|
# Just a note for possible future improvement.
|
|
|
|
- name: Block for multihost lists
|
|
block:
|
|
- name: Check if the site list exists
|
|
command: list_lists --bare
|
|
environment:
|
|
HOST: "{{ mm_site_listdomain }}"
|
|
register: listlists
|
|
- name: Create the site list if it doesn't exist
|
|
command:
|
|
cmd: "newlist {% if mailman_test_mode is defined and mailman_test_mode %} -q {% endif %} {{ mm_list_name }} {{ mm_list_admin }} {{ mm_list_password }}"
|
|
stdin: ''
|
|
environment:
|
|
HOST: "{{ mm_site_listdomain }}"
|
|
when:
|
|
- ( listlists.stdout_lines | intersect([ mm_list_name ]) | length | int ) == 0
|
|
when: mm_site_name != "_default"
|
|
|
|
- name: Block for normal lists
|
|
block:
|
|
- name: Check if the list exists
|
|
command: list_lists --bare
|
|
register: listlists
|
|
- name: Create the list if it doesn't exist
|
|
command:
|
|
cmd: "newlist {% if mailman_test_mode is defined and mailman_test_mode %} -q {% endif %} {{ mm_list_name }} {{ mm_list_admin }} {{ mm_list_password }}"
|
|
stdin: ''
|
|
when:
|
|
- ( listlists.stdout_lines | intersect([ mm_list_name ]) | length | int ) == 0
|
|
when: mm_site_name == "_default"
|
|
|
|
# TODO we accept a description parameter but don't do anything with it
|