Merge pull request 'Fixes #798. Update the mailman ansible role.' (#11) from adellam/mailman:master into master
This commit is contained in:
commit
ac3072336b
|
@ -132,7 +132,24 @@ mailman_postorious_db_user: mailmansuite_u
|
||||||
mailman_postorious_db_host: 'localhost'
|
mailman_postorious_db_host: 'localhost'
|
||||||
mailman_postorious_db_port: ''
|
mailman_postorious_db_port: ''
|
||||||
mailman_use_hyperkitty_archiver: True
|
mailman_use_hyperkitty_archiver: True
|
||||||
# /opt/mailman/mailman-suite/mailman-suite_project/manage.py runjobs quarter_hourly
|
#
|
||||||
mailman_postorious_cronjob_frequency: 'quarter_hourly'
|
# @hourly apache django-admin runjobs hourly --pythonpath /path/to/project --settings settings
|
||||||
|
# @daily apache django-admin runjobs daily --pythonpath /path/to/project --settings settings
|
||||||
|
# @weekly apache django-admin runjobs weekly --pythonpath /path/to/project --settings settings
|
||||||
|
# @monthly apache django-admin runjobs monthly --pythonpath /path/to/project --settings settings
|
||||||
|
# @yearly apache django-admin runjobs yearly --pythonpath /path/to/project --settings settings
|
||||||
|
# * * * * * apache django-admin runjobs minutely --pythonpath /path/to/project --settings settings
|
||||||
|
# 2,17,32,47 * * * * apache django-admin runjobs quarter_hourly --pythonpath /path/to/project --settings settings
|
||||||
|
mailman_postorious_cronjob_frequency:
|
||||||
|
- 'yearly'
|
||||||
|
- 'monthly'
|
||||||
|
- 'weekly'
|
||||||
|
- 'daily'
|
||||||
|
- 'hourly'
|
||||||
|
|
||||||
|
mailman_postorious_cronjob_special_times:
|
||||||
|
- 'quarter_hourly'
|
||||||
|
- 'minutely'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,6 @@
|
||||||
- 'falcon-bench'
|
- 'falcon-bench'
|
||||||
- 'mako-render'
|
- 'mako-render'
|
||||||
- 'alembic'
|
- 'alembic'
|
||||||
- 'mailman'
|
|
||||||
|
|
||||||
- name: Create the tmpfile entry for the mailman lock directory
|
- name: Create the tmpfile entry for the mailman lock directory
|
||||||
template: src=tmpfile_mailman.conf.j2 dest=/usr/lib/tmpfiles.d/mailman.conf owner=root group=root mode=0644
|
template: src=tmpfile_mailman.conf.j2 dest=/usr/lib/tmpfiles.d/mailman.conf owner=root group=root mode=0644
|
||||||
|
@ -128,7 +127,7 @@
|
||||||
|
|
||||||
- name: Setup postorius and hyperkitty
|
- name: Setup postorius and hyperkitty
|
||||||
become_user: '{{ mailman_user }}'
|
become_user: '{{ mailman_user }}'
|
||||||
shell: cd '{{ mailman_postorious_dir }}' && {{ mailman_home }}/{{ mailman_virtualenv_name }}/bin/python3 manage.py migrate && {{ mailman_home }}/{{ mailman_virtualenv_name }}/bin/python3 manage.py collectstatic
|
shell: cd '{{ mailman_postorious_dir }}' && mkdir -p locale && {{ mailman_home }}/{{ mailman_virtualenv_name }}/bin/python3 manage.py migrate && {{ mailman_home }}/{{ mailman_virtualenv_name }}/bin/python3 manage.py compilemessages && {{ mailman_home }}/{{ mailman_virtualenv_name }}/bin/python3 manage.py collectstatic
|
||||||
args:
|
args:
|
||||||
creates: '{{ mailman_postorious_dir }}/static/admin/js/actions.js'
|
creates: '{{ mailman_postorious_dir }}/static/admin/js/actions.js'
|
||||||
|
|
||||||
|
@ -144,15 +143,42 @@
|
||||||
when: mailman_use_hyperkitty_archiver | bool
|
when: mailman_use_hyperkitty_archiver | bool
|
||||||
register: mailman_hyperkitty_install
|
register: mailman_hyperkitty_install
|
||||||
|
|
||||||
- name: add a cron job that syncs the mailman core and postorious settings
|
tags: [ 'mailman', 'postorious', 'hyperkitty', 'mailman_conf' ]
|
||||||
|
|
||||||
|
- name: Setup the postorius cron jobs
|
||||||
|
block:
|
||||||
|
- name: add a cron job that syncs the mailman core and postorius settings
|
||||||
cron:
|
cron:
|
||||||
job: "{{ mailman_postorious_dir }}/manage.py runjobs {{ mailman_postorious_cronjob_frequency }} > {{ mailman_postorious_log_dir }}/runjobs.log 2>&1"
|
job: "{{ mailman_postorious_dir }}/manage.py runjobs {{ item }} > {{ mailman_postorious_log_dir }}/runjobs-{{ item }}.log 2>&1"
|
||||||
special_time: hourly
|
special_time: '{{ item }}'
|
||||||
user: '{{ mailman_user }}'
|
user: '{{ mailman_user }}'
|
||||||
name: "postorious / hyperkitty runjobs"
|
name: "postorious / hyperkitty runjobs {{ item }}"
|
||||||
|
cron_file: 'postorius-runjobs-{{ item }}'
|
||||||
|
state: present
|
||||||
|
disabled: no
|
||||||
|
with_items: '{{ mailman_postorious_cronjob_frequency }}'
|
||||||
|
|
||||||
|
- name: postorius cron job that runs every 15 minutes
|
||||||
|
cron:
|
||||||
|
job: "{{ mailman_postorious_dir }}/manage.py runjobs quarter_hourly > {{ mailman_postorious_log_dir }}/runjobs-quarter_hourly.log 2>&1"
|
||||||
|
minute: "3,18,33,48"
|
||||||
|
user: '{{ mailman_user }}'
|
||||||
|
name: "postorious / hyperkitty runjobs quarter_hourly"
|
||||||
|
cron_file: 'postorius-runjobs-quarter_hourly'
|
||||||
|
disabled: no
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
tags: [ 'mailman', 'postorious', 'hyperkitty', 'mailman_conf' ]
|
- name: postorius cron job that runs every minute
|
||||||
|
cron:
|
||||||
|
job: "{{ mailman_postorious_dir }}/manage.py runjobs minutely > {{ mailman_postorious_log_dir }}/runjobs-minutely.log 2>&1"
|
||||||
|
minute: "*"
|
||||||
|
user: '{{ mailman_user }}'
|
||||||
|
name: "postorious / hyperkitty runjobs minutely"
|
||||||
|
cron_file: 'postorius-runjobs-minutely'
|
||||||
|
state: present
|
||||||
|
disabled: no
|
||||||
|
|
||||||
|
tags: [ 'mailman', 'postorious', 'hyperkitty', 'mailman_conf', 'postorius_cron' ]
|
||||||
|
|
||||||
- name: Manage the mailman service
|
- name: Manage the mailman service
|
||||||
block:
|
block:
|
||||||
|
|
Loading…
Reference in New Issue