MythicSalt/states/mailman/init.sls

91 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2023-05-22 17:09:38 +01:00
mailman3:
pkg.installed:
- pkgs:
- mailman3-full
- libapache2-mod-proxy-uwsgi
mailman3_conf:
file.managed:
- names:
- /etc/mailman3/mailman.cfg:
- source: salt://mailman/etc/mailman.cfg
- group: list
- mode: 0640
- template: jinja
- /etc/mailman3/mailman-hyperkitty.cfg:
- source: salt://mailman/etc/mailman-hyperkitty.cfg
- group: list
- mode: 0640
- template: jinja
- require:
- pkg: mailman3
service.running:
- name: mailman3
- restart: true
- watch:
- file: mailman3_conf
mailman3_web_conf:
file.managed:
- names:
2023-05-22 17:09:38 +01:00
- /etc/mailman3/mailman-web.py:
- source: salt://mailman/etc/mailman-web.py
- group: www-data
- mode: 0640
- template: jinja
- require:
- pkg: mailman3
- sls: apache
service.running:
- name: mailman3-web
2023-05-22 17:09:38 +01:00
- restart: true
- watch:
- file: mailman3_web_conf
2023-05-22 17:09:38 +01:00
mailman3_exim4_conf:
file.recurse:
- name: /etc/exim4
- dir_mode: '0755'
- file_mode: '0644'
- source: salt://mailman/exim4
- require:
- sls: email/exim4
mailman3_exim4_update_conf:
cmd.run:
- name: update-exim4.conf
- onchanges:
- file: mailman3_exim4_conf
mailman3_exim4_service:
service.running:
- name: exim4
- reload: true
- watch:
- cmd: mailman3_exim4_update_conf
mailman3_apache_uwsgi:
apache_module.enabled:
- name: proxy_uwsgi
- require:
- pkg: mailman3
mailman3_apache_web:
file.managed:
- require:
- sls: apache
- sls: certificates
- names:
- /etc/apache2/sites-available/lists.lunch.org.uk.conf:
- source: salt://mailman/lists.lunch.org.uk.conf
apache_site.enabled:
- require:
- file: /etc/apache2/sites-available/lists.lunch.org.uk.conf
- name: lists.lunch.org.uk
service.running:
- name: apache2
- reload: true
- watch:
- file: /etc/apache2/sites-available/lists.lunch.org.uk.conf