forked from ISTI-ansible-roles/ansible-role-mailman
Add a tag to the tasks that install the generic templates.
This commit is contained in:
parent
9da458e2db
commit
cf67c8a82d
|
|
@ -34,6 +34,13 @@ mailman_custom_templates:
|
|||
- 'it/list:user:notice:probe.txt'
|
||||
- 'it/list:user:notice:welcome.txt'
|
||||
|
||||
# Subset of the custom templates required by the archive-aware footer feature.
|
||||
# Keeping it separate allows the feature to be deployed without reinstalling
|
||||
# every site-level Mailman template.
|
||||
mailman_archive_footer_templates:
|
||||
- 'en/list:member:generic:footer.txt'
|
||||
- 'it/list:member:generic:footer.txt'
|
||||
|
||||
mailman_enable_daily_notifications: true
|
||||
|
||||
# Periodically perform a verified stop/start cycle. The timer is disabled by
|
||||
|
|
|
|||
|
|
@ -53,17 +53,21 @@
|
|||
with_items: '{{ mailman_pip_packages }}'
|
||||
|
||||
- name: Install the legacy HyperKitty compatibility patcher
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: mailman-legacy-hyperkitty-compatibility.py.j2
|
||||
dest: '{{ mailman_legacy_hyperkitty_patch_script }}'
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0750'
|
||||
when: mailman_enable_legacy_hyperkitty_compatibility_patches | bool
|
||||
tags: [ 'mailman', 'mailman_conf', 'mailman_hyperkitty_compatibility' ]
|
||||
tags:
|
||||
- mailman
|
||||
- mailman_conf
|
||||
- mailman_hyperkitty_compatibility
|
||||
- mailman_archive_footer
|
||||
|
||||
- name: Apply the legacy HyperKitty compatibility patches
|
||||
command:
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- '{{ mailman_bindir }}/python'
|
||||
- '{{ mailman_legacy_hyperkitty_patch_script }}'
|
||||
|
|
@ -76,7 +80,11 @@
|
|||
- Restart hyperkitty qcluster
|
||||
- Restart mailmansuite
|
||||
- Restart mailman
|
||||
tags: [ 'mailman', 'mailman_conf', 'mailman_hyperkitty_compatibility' ]
|
||||
tags:
|
||||
- mailman
|
||||
- mailman_conf
|
||||
- mailman_hyperkitty_compatibility
|
||||
- mailman_archive_footer
|
||||
|
||||
- name: Install the mailman and postfix configuration files
|
||||
template: src={{ item }}.j2 dest={{ mailman_conf_dir }}/{{ item }} owner=root group={{ mailman_user }} mode=0440
|
||||
|
|
@ -254,16 +262,38 @@
|
|||
cron_file: 'mailman-notifications'
|
||||
state: "{% if mailman_enable_daily_notifications %}present{% else %}absent{% endif %}"
|
||||
|
||||
- name: Install some default templates
|
||||
- name: Install default Mailman templates
|
||||
tags: [mailman, mailman_templates]
|
||||
block:
|
||||
- name: Create the 'site' directory and the language subdirs
|
||||
file: dest={{ mailman_var_dir }}/templates/site/{{ item }} state=directory owner={{ mailman_user }} group={{ mailman_user}}
|
||||
with_items:
|
||||
- it
|
||||
- en
|
||||
- name: Create the site-level Mailman template directories
|
||||
ansible.builtin.file:
|
||||
path: '{{ mailman_var_dir }}/templates/site/{{ item }}'
|
||||
state: directory
|
||||
owner: '{{ mailman_user }}'
|
||||
group: '{{ mailman_user }}'
|
||||
mode: '0755'
|
||||
loop:
|
||||
- it
|
||||
- en
|
||||
tags: [mailman_archive_footer]
|
||||
|
||||
- name: Install the custom templates
|
||||
template: src=site/{{ item }}.j2 dest={{ mailman_var_dir }}/templates/site/{{ item }} owner={{ mailman_user }} group={{ mailman_user}}
|
||||
with_items: '{{ mailman_custom_templates }}'
|
||||
- name: Install custom Mailman templates other than the archive footer
|
||||
ansible.builtin.template:
|
||||
src: 'site/{{ item }}.j2'
|
||||
dest: '{{ mailman_var_dir }}/templates/site/{{ item }}'
|
||||
owner: '{{ mailman_user }}'
|
||||
group: '{{ mailman_user }}'
|
||||
mode: '0644'
|
||||
loop: '{{ mailman_custom_templates }}'
|
||||
when: item not in mailman_archive_footer_templates
|
||||
|
||||
tags: [ 'mailman', 'mailman_templates' ]
|
||||
- name: Install archive-aware Mailman footer templates
|
||||
ansible.builtin.template:
|
||||
src: 'site/{{ item }}.j2'
|
||||
dest: '{{ mailman_var_dir }}/templates/site/{{ item }}'
|
||||
owner: '{{ mailman_user }}'
|
||||
group: '{{ mailman_user }}'
|
||||
mode: '0644'
|
||||
loop: '{{ mailman_archive_footer_templates }}'
|
||||
when: item in mailman_custom_templates
|
||||
tags: [mailman_archive_footer]
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
mode: '0750'
|
||||
register: mailman_postorius_site_config_helper_install
|
||||
when: mailman_manage_postorius_site | bool
|
||||
tags: [mailman_postorius_site]
|
||||
tags: [mailman_postorius_site, mailman_archive_footer]
|
||||
|
||||
- name: Configure the canonical Django Site used by archive links
|
||||
become: true
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
- >-
|
||||
not ansible_check_mode or
|
||||
mailman_postorius_site_config_helper_install is not changed
|
||||
tags: [mailman_postorius_site]
|
||||
tags: [mailman_postorius_site, mailman_archive_footer]
|
||||
|
||||
- name: Install the hyperkitty configuration file
|
||||
ansible.builtin.template:
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
when: mailman_use_hyperkitty_archiver | bool
|
||||
register: mailman_hyperkitty_install
|
||||
notify: Restart mailman
|
||||
tags: [mailman_postorius_site]
|
||||
tags: [mailman_postorius_site, mailman_archive_footer]
|
||||
|
||||
tags: [mailman, postorius, hyperkitty, mailman_conf]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue