Browse Source

add role mailman3

python3
Andrea Cimbalo 6 years ago
parent
commit
e0f1d25b48
5 changed files with 57 additions and 0 deletions
  1. +18
    -0
      lists2.yaml
  2. +4
    -0
      roles/mailman3/defaults/main.yaml
  3. +4
    -0
      roles/mailman3/meta/main.yaml
  4. +17
    -0
      roles/mailman3/tasks/main.yaml
  5. +14
    -0
      roles/mailman3/templates/mailman3.conf

+ 18
- 0
lists2.yaml View File

@ -0,0 +1,18 @@
---
# - hosts: biff
# roles:
# - role: lxc_guest
# vm_name: lists
# distro: sid
# - role: ssh_server
# ansible_connection: lxc_ssh
# ansible_docker_extra_args: lists
- hosts: lists
roles:
# - role: dns_record
# - role: reverse_proxy
# hostname: lists2
- role: mailman3
- hosts: status
roles:
- role: icinga2-monitoring

+ 4
- 0
roles/mailman3/defaults/main.yaml View File

@ -0,0 +1,4 @@
---
server_fqdn: "lists2.lilik.it"
remote_host: "unix:/run/mailman3-web/uwsgi.sock"
proxy_type: "uwsgi_pass"

+ 4
- 0
roles/mailman3/meta/main.yaml View File

@ -0,0 +1,4 @@
---
dependencies:
- role: nginx
server_fqdn: "lists2.lilik.it"

+ 17
- 0
roles/mailman3/tasks/main.yaml View File

@ -0,0 +1,17 @@
---
- name: install mailman and associated packages
apt:
name: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 3600
with_items:
- mailman3-full
- python3-django-hyperkitty
- name: add nginx configurations
template:
src: mailman3.conf
dest: "/etc/nginx/locations/{{ server_fqdn }}/mailman3.conf"
notify:
- restart nginx

+ 14
- 0
roles/mailman3/templates/mailman3.conf View File

@ -0,0 +1,14 @@
{% extends "roles/nginx/templates/service.conf" %}
{% block root %}
include /etc/nginx/uwsgi_params;
{% endblock %}
{% block extra %}
location /mailman3/static {
alias /var/lib/mailman3/web/static;
}
location /mailman3/static/favicon.ico {
alias /var/lib/mailman3/web/static/postorius/img/favicon.ico;
}
{% endblock %}

Loading…
Cancel
Save