Skip to content

Commit e0f1d25

Browse files
committed
add role mailman3
1 parent 1a647f7 commit e0f1d25

5 files changed

Lines changed: 57 additions & 0 deletions

File tree

lists2.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
# - hosts: biff
3+
# roles:
4+
# - role: lxc_guest
5+
# vm_name: lists
6+
# distro: sid
7+
# - role: ssh_server
8+
# ansible_connection: lxc_ssh
9+
# ansible_docker_extra_args: lists
10+
- hosts: lists
11+
roles:
12+
# - role: dns_record
13+
# - role: reverse_proxy
14+
# hostname: lists2
15+
- role: mailman3
16+
- hosts: status
17+
roles:
18+
- role: icinga2-monitoring

roles/mailman3/defaults/main.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
server_fqdn: "lists2.lilik.it"
3+
remote_host: "unix:/run/mailman3-web/uwsgi.sock"
4+
proxy_type: "uwsgi_pass"

roles/mailman3/meta/main.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
dependencies:
3+
- role: nginx
4+
server_fqdn: "lists2.lilik.it"

roles/mailman3/tasks/main.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
- name: install mailman and associated packages
3+
apt:
4+
name: "{{ item }}"
5+
state: present
6+
update_cache: yes
7+
cache_valid_time: 3600
8+
with_items:
9+
- mailman3-full
10+
- python3-django-hyperkitty
11+
12+
- name: add nginx configurations
13+
template:
14+
src: mailman3.conf
15+
dest: "/etc/nginx/locations/{{ server_fqdn }}/mailman3.conf"
16+
notify:
17+
- restart nginx
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "roles/nginx/templates/service.conf" %}
2+
{% block root %}
3+
include /etc/nginx/uwsgi_params;
4+
5+
{% endblock %}
6+
{% block extra %}
7+
location /mailman3/static {
8+
alias /var/lib/mailman3/web/static;
9+
}
10+
11+
location /mailman3/static/favicon.ico {
12+
alias /var/lib/mailman3/web/static/postorius/img/favicon.ico;
13+
}
14+
{% endblock %}

0 commit comments

Comments
 (0)