summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2018-12-06 15:55:41 -0500
committerMichael Scherer <misc@redhat.com>2018-12-06 15:55:41 -0500
commitf6c389cfc46375d207b24d132959e147d3f6f51a (patch)
tree86bac1acdb1c3f6b86d284ace3f69791dcb3fa8e
parentaae47d8deac02bdddd64f57778b08f695db1ffa0 (diff)
Switch to LE for the ml list
-rw-r--r--playbooks/osci.theopensourceway.org.yml6
-rw-r--r--roles/mailman/meta/main.yml2
-rw-r--r--roles/mailman/tasks/main.yml4
-rw-r--r--roles/mailman/templates/vhost.conf17
4 files changed, 14 insertions, 15 deletions
diff --git a/playbooks/osci.theopensourceway.org.yml b/playbooks/osci.theopensourceway.org.yml
index e736736..b2f8c3a 100644
--- a/playbooks/osci.theopensourceway.org.yml
+++ b/playbooks/osci.theopensourceway.org.yml
@@ -26,7 +26,11 @@
old_wiki_dir: /var/www/old_server/wiki/
website_domain: www.theopensourceway.org
#- deploy_website
- - mailman_lists
+
+ - role: mailman_lists
+ website_domain: lists.theopensourceway.org
+ use_letsencrypt: True
+
- mediawiki
- hosts: osci.theopensourceway.org
diff --git a/roles/mailman/meta/main.yml b/roles/mailman/meta/main.yml
index e949ef9..0d441a6 100644
--- a/roles/mailman/meta/main.yml
+++ b/roles/mailman/meta/main.yml
@@ -1,5 +1,5 @@
---
dependencies:
- { role: postfix }
-- { role: httpd, custom_vhost: yes }
+- { role: httpd }
diff --git a/roles/mailman/tasks/main.yml b/roles/mailman/tasks/main.yml
index e5b78da..5cf2fe6 100644
--- a/roles/mailman/tasks/main.yml
+++ b/roles/mailman/tasks/main.yml
@@ -23,7 +23,9 @@
notify: update mailman aliases
-- template: src=vhost.conf dest=/etc/httpd/conf.d/{{ website_url | default( ansible_hostname ) }}.conf
+- template:
+ src: vhost.conf
+ dest: "/etc/httpd/conf.d/{{ website_domain }}.conf.d/mailman.conf"
notify: restart httpd
- copy: mode=0755 src=update_templates_mailman.sh dest=/usr/local/bin/update_templates_mailman.sh
diff --git a/roles/mailman/templates/vhost.conf b/roles/mailman/templates/vhost.conf
index bd2f01e..8e4de27 100644
--- a/roles/mailman/templates/vhost.conf
+++ b/roles/mailman/templates/vhost.conf
@@ -1,14 +1,7 @@
-{% for i in '80', '443' %}
-<VirtualHost *:{{ i }}>
+<Directory /usr/lib/mailman/cgi-bin/>
+ DirectoryIndex listinfo
+</Directory>
- <Directory /usr/lib/mailman/cgi-bin/>
- DirectoryIndex listinfo
- </Directory>
+RedirectMatch ^/$ /mailman/
- RedirectMatch ^/$ /mailman/
-
- RedirectMatch ^/mailman[/]*$ /mailman/listinfo
- ServerName {{ website_url | default( ansible_hostname ) }}
-
-</VirtualHost>
-{% endfor %}
+RedirectMatch ^/mailman[/]*$ /mailman/listinfo