From 4c4e27cb3a4d33a20651c1fe5931e8d023812296 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 4 May 2021 11:55:47 -0700 Subject: [PATCH] Ansible mailman configs This converts our existing puppeted mailman configuration into a set of ansible roles and a new playbook. We don't try to do anything new and instead do our best to map from puppet to ansible as closely as possible. This helps reduce churn and will help us find problems more quickly if they happen. Followups will further cleanup the puppetry. Change-Id: If8cdb1164c9000438d1977d8965a92ca8eebe4df --- inventory/service/groups.yaml | 4 - .../host_vars/lists.katacontainers.io.yaml | 15 + .../host_vars/lists.openstack.org.yaml | 262 +++++++++++ manifests/site.pp | 18 - .../test-fixtures/results.yaml | 2 - playbooks/roles/mailman-list/README.rst | 1 + playbooks/roles/mailman-list/tasks/main.yaml | 35 ++ playbooks/roles/mailman-site/README.rst | 1 + .../html-templates-en/admindbdetails.html | 60 +++ .../html-templates-en/admindbpreamble.html | 10 + .../html-templates-en/admindbsummary.html | 14 + .../html-templates-en/adminsubscribeack.txt | 3 + .../html-templates-en/adminunsubscribeack.txt | 2 + .../openstack/html-templates-en/admlogin.html | 40 ++ .../openstack/html-templates-en/approve.txt | 15 + .../html-templates-en/archidxentry.html | 4 + .../html-templates-en/archidxfoot.html | 64 +++ .../html-templates-en/archidxhead.html | 89 ++++ .../html-templates-en/archlistend.html | 1 + .../html-templates-en/archliststart.html | 4 + .../openstack/html-templates-en/archtoc.html | 130 ++++++ .../html-templates-en/archtocentry.html | 12 + .../html-templates-en/archtocnombox.html | 131 ++++++ .../openstack/html-templates-en/article.html | 168 +++++++ .../openstack/html-templates-en/bounce.txt | 13 + .../openstack/html-templates-en/checkdbs.txt | 7 + .../openstack/html-templates-en/convert.txt | 34 ++ .../openstack/html-templates-en/cronpass.txt | 19 + .../openstack/html-templates-en/disabled.txt | 25 ++ .../html-templates-en/emptyarchive.html | 125 ++++++ .../openstack/html-templates-en/headfoot.html | 28 ++ .../openstack/html-templates-en/help.txt | 33 ++ .../openstack/html-templates-en/invite.txt | 20 + .../openstack/html-templates-en/listinfo.html | 254 +++++++++++ .../openstack/html-templates-en/masthead.txt | 13 + .../openstack/html-templates-en/newlist.txt | 35 ++ .../html-templates-en/nomoretoday.txt | 8 + .../openstack/html-templates-en/options.html | 422 ++++++++++++++++++ .../openstack/html-templates-en/postack.txt | 8 + .../openstack/html-templates-en/postauth.txt | 13 + .../openstack/html-templates-en/postheld.txt | 15 + .../openstack/html-templates-en/private.html | 44 ++ .../openstack/html-templates-en/probe.txt | 25 ++ .../openstack/html-templates-en/refuse.txt | 13 + .../openstack/html-templates-en/roster.html | 160 +++++++ .../openstack/html-templates-en/subauth.txt | 11 + .../html-templates-en/subscribe.html | 117 +++++ .../html-templates-en/subscribeack.txt | 33 ++ .../openstack/html-templates-en/unsub.txt | 23 + .../openstack/html-templates-en/unsubauth.txt | 11 + .../openstack/html-templates-en/userpass.txt | 24 + .../openstack/html-templates-en/verify.txt | 22 + .../roles/mailman-site/handlers/main.yaml | 4 + playbooks/roles/mailman-site/tasks/main.yaml | 108 +++++ .../mailman-site/templates/mailman.init.j2 | 116 +++++ .../templates/mailman_multihost.vhost.j2 | 62 +++ .../mailman-site/templates/mm_site_cfg.py.j2 | 153 +++++++ playbooks/roles/mailman/README.rst | 1 + playbooks/roles/mailman/files/index.html | 4 + .../roles/mailman/files/mk-archives-index | 9 + .../roles/mailman/files/mm_cfg_multihost.py | 45 ++ playbooks/roles/mailman/files/robots.txt | 2 + playbooks/roles/mailman/handlers/main.yaml | 9 + playbooks/roles/mailman/tasks/main.yaml | 128 ++++++ .../roles/mailman/templates/mailman.vhost.j2 | 61 +++ .../roles/mailman/templates/mm_cfg.py.j2 | 119 +++++ playbooks/roles/mailman/templates/sites.j2 | 3 + playbooks/service-lists.yaml | 5 + playbooks/zuul/run-base.yaml | 1 + .../host_vars/lists.katacontainers.io.yaml.j2 | 2 + .../host_vars/lists.openstack.org.yaml.j2 | 3 +- testinfra/test_lists_k_i.py | 17 + testinfra/test_lists_o_o.py | 29 ++ zuul.d/system-config-run.yaml | 17 +- 74 files changed, 3507 insertions(+), 31 deletions(-) create mode 100644 playbooks/roles/mailman-list/README.rst create mode 100644 playbooks/roles/mailman-list/tasks/main.yaml create mode 100644 playbooks/roles/mailman-site/README.rst create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbdetails.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbpreamble.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbsummary.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/adminsubscribeack.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/adminunsubscribeack.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/admlogin.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/approve.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxentry.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxfoot.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxhead.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/archlistend.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/archliststart.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/archtoc.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/archtocentry.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/archtocnombox.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/article.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/bounce.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/checkdbs.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/convert.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/cronpass.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/disabled.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/emptyarchive.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/headfoot.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/help.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/invite.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/listinfo.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/masthead.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/newlist.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/nomoretoday.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/options.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/postack.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/postauth.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/postheld.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/private.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/probe.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/refuse.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/roster.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/subauth.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/subscribe.html create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/subscribeack.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/unsub.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/unsubauth.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/userpass.txt create mode 100644 playbooks/roles/mailman-site/files/openstack/html-templates-en/verify.txt create mode 100644 playbooks/roles/mailman-site/handlers/main.yaml create mode 100644 playbooks/roles/mailman-site/tasks/main.yaml create mode 100644 playbooks/roles/mailman-site/templates/mailman.init.j2 create mode 100644 playbooks/roles/mailman-site/templates/mailman_multihost.vhost.j2 create mode 100644 playbooks/roles/mailman-site/templates/mm_site_cfg.py.j2 create mode 100644 playbooks/roles/mailman/README.rst create mode 100644 playbooks/roles/mailman/files/index.html create mode 100755 playbooks/roles/mailman/files/mk-archives-index create mode 100644 playbooks/roles/mailman/files/mm_cfg_multihost.py create mode 100644 playbooks/roles/mailman/files/robots.txt create mode 100644 playbooks/roles/mailman/handlers/main.yaml create mode 100644 playbooks/roles/mailman/tasks/main.yaml create mode 100644 playbooks/roles/mailman/templates/mailman.vhost.j2 create mode 100644 playbooks/roles/mailman/templates/mm_cfg.py.j2 create mode 100644 playbooks/roles/mailman/templates/sites.j2 create mode 100644 playbooks/service-lists.yaml create mode 100644 playbooks/zuul/templates/host_vars/lists.katacontainers.io.yaml.j2 create mode 100644 testinfra/test_lists_k_i.py create mode 100644 testinfra/test_lists_o_o.py diff --git a/inventory/service/groups.yaml b/inventory/service/groups.yaml index 806faa478b..5a46fedd66 100644 --- a/inventory/service/groups.yaml +++ b/inventory/service/groups.yaml @@ -138,8 +138,6 @@ groups: - elasticsearch[0-9]*.open*.org - ethercalc[0-9]*.open*.org - health[0-9]*.openstack.org - - lists*.katacontainers.io - - lists*.open*.org - logstash-worker[0-9]*.open*.org - logstash[0-9]*.open*.org - mirror-update[0-9]*.openstack.org @@ -165,8 +163,6 @@ groups: - elasticsearch[0-9]*.open*.org - ethercalc[0-9]*.open*.org - health[0-9]*.openstack.org - - lists*.katacontainers.io - - lists*.open*.org - lists-dev[0-9]*.open*.org - logstash-worker[0-9]*.open*.org - logstash[0-9]*.open*.org diff --git a/inventory/service/host_vars/lists.katacontainers.io.yaml b/inventory/service/host_vars/lists.katacontainers.io.yaml index 5ce67ab800..e3788a85fa 100644 --- a/inventory/service/host_vars/lists.katacontainers.io.yaml +++ b/inventory/service/host_vars/lists.katacontainers.io.yaml @@ -58,3 +58,18 @@ exim_transports: headers_add = Errors-To: ${return_path} extra_users: - jbryce +mailman_multihost: false +mailman_listdomain: 'lists.katacontainers.io' +mailman_lists: + - name: kata-dev + description: 'Kata Containers Development Mailing List (not for usage questions)' + admin: 'jonathan@openstack.org' + password: "{{ mailman_list_password }}" + - name: kata-hypervisor + description: 'Discussion of security and virtualization targeted at container use cases' + admin: 'jonathan@openstack.org' + password: "{{ mailman_list_password }}" + - name: embargo-notice + description: 'Announcements of embargoed notices for the Kata Containers project' + admin: 'jonathan@openstack.org' + password: "{{ mailman_list_password }}" diff --git a/inventory/service/host_vars/lists.openstack.org.yaml b/inventory/service/host_vars/lists.openstack.org.yaml index 733c9094e6..40cde31870 100644 --- a/inventory/service/host_vars/lists.openstack.org.yaml +++ b/inventory/service/host_vars/lists.openstack.org.yaml @@ -94,3 +94,265 @@ exim_transports: headers_remove = Errors-To max_rcpt = 1 return_path = ${local_part:$return_path}+$local_part=$domain@${domain:$return_path} +mailman_multihost: true +mailman_sites: + - name: airship + listdomain: lists.airshipit.org + install_languages: ['en'] + lists: + - name: mailman + description: 'The mailman site list' + admin: 'nobody@openstack.org' + password: "{{ mailman_list_password }}" + - name: airship-announce + description: 'Announcements of Airship releases and other important information.' + admin: 'jonathan@openstack.org' + password: "{{ mailman_list_password }}" + - name: airship-discuss + description: 'Discussion of Airship usage and development.' + admin: 'jonathan@openstack.org' + password: "{{ mailman_list_password }}" + - name: airship-job-failures + description: 'Notification messages for failures from CICD jobs.' + admin: 'roman.gorshunov@att.com' + password: "{{ mailman_list_password }}" + - name: airship-security + description: 'Public Airship security advisories.' + admin: 'andrew.walters@att.com' + password: "{{ mailman_list_password }}" + - name: airship-embargo-notice + description: 'Embargoed security vulnerability announcements for Airship consumers.' + admin: 'andrew.walters@att.com' + password: "{{ mailman_list_password }}" + - name: opendev + listdomain: lists.opendev.org + install_languages: ['en'] + lists: + - name: mailman + description: 'The mailman site list' + admin: 'nobody@openstack.org' + password: "{{ mailman_list_password }}" + - name: rust-vmm + description: 'Collaborating on Rust-based virtual machine monitors.' + admin: 'claire@openstack.org' + password: "{{ mailman_list_password }}" + - name: rustyk8s + description: 'Collaborating on Rust-based Kubernetes API.' + admin: 'allison@lohutok.net' + password: "{{ mailman_list_password }}" + - name: nbmp-discuss + description: 'Collaborating on Network Based Media Processing related platform and infrastructure systems usage and development.' + admin: 'ildiko@openstack.org' + password: "{{ mailman_list_password }}" + - name: service-announce + description: 'Announcement list for OpenDev services.' + admin: 'cboylan@sapwetik.org' + password: "{{ mailman_list_password }}" + - name: service-discuss + description: 'Discussion list for OpenDev services.' + admin: 'cboylan@sapwetik.org' + password: "{{ mailman_list_password }}" + - name: service-incident + description: 'Private list for OpenDev incident coordination.' + admin: 'cboylan@sapwetik.org' + password: "{{ mailman_list_password }}" + - name: openinfralabs + description: 'Discussion of the OpenInfra Labs academic and research resource sharing effort' + admin: 'mnaser@vexxhost.com' + password: "{{ mailman_list_password }}" + - name: openstack + listdomain: lists.openstack.org + install_languages: ['de', 'fr', 'it', 'ko', 'ru', 'vi', 'zh_TW'] + lists: + - name: mailman + description: 'The mailman site list' + admin: 'nobody@openstack.org' + password: "{{ mailman_list_password }}" + - name: openstack-es + description: 'Lista de correo acerca de OpenStack en español' + admin: 'flavio@redhat.com' + password: "{{ mailman_list_password }}" + - name: openstack-fr + description: 'List of the OpenStack french user group' + admin: 'erwan@erwan.com' + password: "{{ mailman_list_password }}" + - name: openstack-de + description: 'List for German-speaking OpenStack users' + admin: 'christian@berendt.io' + password: "{{ mailman_list_password }}" + - name: openstack-i18n + description: 'List of the OpenStack Internationalization team.' + admin: 'guoyingc@cn.ibm.com' + password: "{{ mailman_list_password }}" + - name: openstack-i18n-de + description: 'List of the German OpenStack Internationalization team.' + admin: 'robert.simai@suse.com' + password: "{{ mailman_list_password }}" + - name: openstack-ir + description: 'OpenStack IRAN Community Discussions in Persian/Farsi' + admin: 'Roozbeh.Shafiee@Gmail.Com' + password: "{{ mailman_list_password }}" + - name: openstack-it + description: 'Discussioni su OpenStack in italiano' + admin: 'stefano@openstack.org' + password: "{{ mailman_list_password }}" + - name: openstack-el + description: 'List of the OpenStack Greek User Group' + admin: 'aparathyras@stackmasters.eu' + password: "{{ mailman_list_password }}" + - name: openstack-travel-committee + description: 'Private discussions for the OpenStack Travel Program Committee for Hong Kong Summit 2013.' + admin: 'communitymngr@openstack.org' + password: "{{ mailman_list_password }}" + - name: openstack-personas + description: 'A group of designers, researchers, developers, writers and users that are creating a set of personas for OpenStack that are intended to help drive development around the needs of our users.' + admin: 'pieter.c.kruithof-jr@hp.com' + password: "{{ mailman_list_password }}" + - name: openstack-vi + description: 'Discussions in Vietnamese - please add Vietnamese translation here' + admin: 'hang.tran@dtt.vn' + password: "{{ mailman_list_password }}" + - name: openstack-tw + description: 'OpenStack Taiwan User Group 臺灣使用者郵件群組)' + admin: 'macjacktw@hotmail.com' + password: "{{ mailman_list_password }}" + - name: openstack-ko + description: 'OpenStack Korea Community Discussions in Korean (오픈스택 한국 커뮤니티 메일링리스트)' + admin: 'ianyrchoi@gmail.com' + password: "{{ mailman_list_password }}" + - name: openstack-ru + description: 'Рассылка для обсуждения OpenStack на русском' + admin: 'ilyaalekseyev@acm.org' + password: "{{ mailman_list_password }}" + - name: openstack-zh + description: 'OpenStack社区中文讨论群组' + admin: 'yeluaiesec@gmail.com' + password: "{{ mailman_list_password }}" + - name: nov-2013-track-chairs + description: 'Coordination of tracks at OpenStack Summit April 2013' + admin: 'claire@openstack.org' + password: "{{ mailman_list_password }}" + - name: openstack-track-chairs + description: 'Coordination of tracks at OpenStack Summits' + admin: 'claire@openstack.org' + password: "{{ mailman_list_password }}" + - name: summitsponsors + description: 'Coordination among OpenStack Summit event sponsors' + admin: 'claire@openstack.org' + password: "{{ mailman_list_password }}" + - name: openstack-sos + description: 'Coordination of activities for Significant Others at Summits' + admin: 'dms@danplanet.com' + password: "{{ mailman_list_password }}" + - name: defcore-committee + description: 'Discussions of the OpenStack Foundation Core Definition Committee' + admin: 'josh@openstack.org' + password: "{{ mailman_list_password }}" + - name: ambassadors + description: 'Private discussions between OpenStack Ambassadors' + admin: 'tom@openstack.org' + password: "{{ mailman_list_password }}" + - name: superuser + description: 'Discussions for Superuser editorial advisors to collaborate, and for readers to be able to contact the editorial team to make suggestions, provide feedback' + admin: 'lauren@openstack.org' + password: "{{ mailman_list_password }}" + - name: admin-cert-wg + description: 'Collaboration workspace for members of the Certified OpenStack Administrator Working Group of the User Commitee/Board.' + admin: 'heidi@openstack.org' + password: "{{ mailman_list_password }}" + - name: openstack-api-consumers + description: 'Discussions around consuming the OpenStack REST APIs and development of API-consuming SDKs and frameworks' + admin: 'mordred@inaugust.com' + password: "{{ mailman_list_password }}" + - name: enterprise-wg + description: 'Collaboration workspace for members of the Win The Enterprise Working Group of the User Commitee/Board.' + admin: 'carol.l.barrett@intel.com' + password: "{{ mailman_list_password }}" + - name: product-wg + description: 'Collaboration workspace for OpenStack-related Product Managers working group.' + admin: 'stefano@openstack.org' + password: "{{ mailman_list_password }}" + - name: tax-affairs + description: 'board committee focused on tax issues.' + admin: 'seanroberts66@gmail.com' + password: "{{ mailman_list_password }}" + - name: third-party-announce + description: 'Announcements for third party CI operators.' + admin: 'anteaya@anteaya.info' + password: "{{ mailman_list_password }}" + - name: foundation-testing-standards + description: 'OpenStack Foundation test standards (for humans, not drivers) working group list.' + admin: 'seanroberts66@gmail.com' + password: "{{ mailman_list_password }}" + - name: analyst-relations + description: 'Coordination of Analyst Relations Working Group.' + admin: 'lauren@openstack.org' + password: "{{ mailman_list_password }}" + - name: app-catalog-admin + description: 'Coordinate admin details for OpenStack Community App Catalog.' + admin: 'doc@aedo.net' + password: "{{ mailman_list_password }}" + - name: openstack-i18n-fr + description: 'List of the OpenStack Internationalization team, french local group.' + admin: 'jftalta@gmail.com' + password: "{{ mailman_list_password }}" + - name: release-job-failures + description: 'Notification messages for failures from release-related build jobs.' + admin: 'doug@doughellmann.com' + password: "{{ mailman_list_password }}" + - name: embargo-notice + description: 'Announcements to stakeholders for embargoed security vulnerabilities.' + admin: 'jeremy@openstack.org' + password: "{{ mailman_list_password }}" + - name: release-announce + description: 'Announcement of official OpenStack releases.' + admin: 'thierry@openstack.org' + password: "{{ mailman_list_password }}" + - name: edge-computing + description: 'Organizing efforts around the edge-computing focus area.' + admin: 'claire@openstack.org' + password: "{{ mailman_list_password }}" + - name: openstack-mentoring + description: 'List to coordinate interactions between mentors and mentees of the OpenStack mentoring program. Also for questions about the mentoring program (i.e. how to get involved, how it works, etc.' + admin: 'amy@demarco.com' + password: "{{ mailman_list_password }}" + - name: openstack-discuss + description: 'Discussion of OpenStack usage and development.' + admin: 'fungi@yuggoth.org' + password: "{{ mailman_list_password }}" + - name: starlingx + listdomain: lists.starlingx.io + install_languages: ['en'] + lists: + - name: mailman + description: 'The mailman site list' + admin: 'nobody@openstack.org' + password: "{{ mailman_list_password }}" + - name: starlingx-announce + description: 'Announcements of StarlingX releases and other important information.' + admin: 'jonathan@openstack.org' + password: "{{ mailman_list_password }}" + - name: starlingx-discuss + description: 'Discussion of StarlingX usage and development.' + admin: 'jonathan@openstack.org' + password: "{{ mailman_list_password }}" + - name: zuul + listdomain: lists.zuul-ci.org + install_languages: ['en'] + lists: + - name: mailman + description: 'The mailman site list' + admin: 'nobody@openstack.org' + password: "{{ mailman_list_password }}" + - name: zuul-announce + description: 'Announcements of Zuul releases and other important information.' + admin: 'corvus@inaugust.com' + password: "{{ mailman_list_password }}" + - name: zuul-discuss + description: 'Discussion of Zuul usage and development.' + admin: 'corvus@inaugust.com' + password: "{{ mailman_list_password }}" + - name: zuul-jobs-failures + description: 'Gets notifications about zuul-jobs periodic job failures.' + admin: 'ssbarnea@redhat.com' + password: "{{ mailman_list_password }}" diff --git a/manifests/site.pp b/manifests/site.pp index e50d9011e3..e38bf6d758 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -20,24 +20,6 @@ node /^cacti\d+\.open.*\.org$/ { } } -# Node-OS: xenial -node /^lists\d*\.open.*\.org$/ { - class { 'openstack_project::server': } - - class { 'openstack_project::lists': - listpassword => hiera('listpassword'), - } -} - -# Node-OS: xenial -node /^lists\d*\.katacontainers\.io$/ { - class { 'openstack_project::server': } - - class { 'openstack_project::kata_lists': - listpassword => hiera('listpassword'), - } -} - # Node-OS: xenial node /^paste\d*\.open.*\.org$/ { $group = "paste" diff --git a/playbooks/roles/install-ansible/files/inventory_plugins/test-fixtures/results.yaml b/playbooks/roles/install-ansible/files/inventory_plugins/test-fixtures/results.yaml index 2bbf13d5d6..41d0c15c91 100644 --- a/playbooks/roles/install-ansible/files/inventory_plugins/test-fixtures/results.yaml +++ b/playbooks/roles/install-ansible/files/inventory_plugins/test-fixtures/results.yaml @@ -20,8 +20,6 @@ results: lists.katacontainers.io: - mailman - - puppet - - puppet4 logstash-worker02.openstack.org: - logstash-worker diff --git a/playbooks/roles/mailman-list/README.rst b/playbooks/roles/mailman-list/README.rst new file mode 100644 index 0000000000..a2ae92ffb6 --- /dev/null +++ b/playbooks/roles/mailman-list/README.rst @@ -0,0 +1 @@ +Role to create a mailman list if it doesn't already exist diff --git a/playbooks/roles/mailman-list/tasks/main.yaml b/playbooks/roles/mailman-list/tasks/main.yaml new file mode 100644 index 0000000000..e6361fb39e --- /dev/null +++ b/playbooks/roles/mailman-list/tasks/main.yaml @@ -0,0 +1,35 @@ +# The bulk of this role can likely be replaced with: +# https://github.com/CCI-MOC/moc-ansible-mailman +# Just a note for possible future improvement. + +- name: Block for multihost lists + block: + - name: Set mailman site root fact + set_fact: + mm_site_root: "/srv/mailman/{{ mm_site_name }}" + cacheable: no + - name: Check if the site list exists + command: list_lists --bare + environment: + MAILMAN_SITE_DIR: "{{ mm_site_root }}" + register: listlists + - name: Create the site list if it doesn't exist + command: "newlist {% if mailman_test_mode is defined and mailman_test_mode %} -q {% endif %} {{ mm_list_name }} {{ mm_list_admin }} {{ mm_list_password }}" + environment: + MAILMAN_SITE_DIR: "{{ mm_site_root }}" + when: + - ( listlists.stdout_lines | intersect([ mm_list_name ]) | length | int ) == 0 + when: mm_site_name != "_default" + +- name: Block for normal lists + block: + - name: Check if the list exists + command: list_lists --bare + register: listlists + - name: Create the list if it doesn't exist + command: "newlist {% if mailman_test_mode is defined and mailman_test_mode %} -q {% endif %} {{ mm_list_name }} {{ mm_list_admin }} {{ mm_list_password }}" + when: + - ( listlists.stdout_lines | intersect([ mm_list_name ]) | length | int ) == 0 + when: mm_site_name == "_default" + +# TODO we accept a description parameter but don't do anything with it diff --git a/playbooks/roles/mailman-site/README.rst b/playbooks/roles/mailman-site/README.rst new file mode 100644 index 0000000000..59fa9a7926 --- /dev/null +++ b/playbooks/roles/mailman-site/README.rst @@ -0,0 +1 @@ +Role to configure a mailman site in a multihost environment diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbdetails.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbdetails.html new file mode 100644 index 0000000000..a6b7eb96d6 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbdetails.html @@ -0,0 +1,60 @@ +The administrative requests are displayed in one of two ways, on a summary page, and on a details page. +The summary page contains pending subscription and unsubscription +requests, as well as postings being held for your approval, grouped by +sender email address. The details page contains a more detailed view of +each held message, including the all the message's headers and an +excerpt of the message body. + +

On all the pages, the following actions are available: + +

+ +

For held messages, turn on the Preserve option if you want to +save a copy of the message for the site administrator. This is useful +for abusive messages that you want to discard, but need to keep a record +of for later inspection. + +

Turn on the Forward to option, and fill in the forwarding +address if you want to forward the message to someone else not on the +list. To edit a held message before it is sent on to the list, you +should forward the message to yourself (or the list owners), and discard +the original message. Then, when the message shows up in your mailbox, +make your edits and resend the message to the list, including an +Approved: header with the list password as its value. It is +proper netiquette in this case to include a note in the resent message, +explaining that you have modified the text. + +

If the sender is a list member who is being moderated, you can +optionally clear their moderation flag. This is useful when your list +is configured to put new members on probation, and you've decided that +this member can be trusted to post to the list without approval. + +

If the sender is not a list member, you can add the email address to +a sender filter. Sender filters are described on the sender filter privacy page, and may be one of +auto-accept (Accepts), auto-hold (Holds), +auto-reject (Rejects), or auto-discard (Discards). This +option will not be available if the address is already on one of the +sender filters. + +

When you're finished, click on the Submit All Data button at +the top or bottom of the page. This button will submit all selected +actions for all administrative requests that you've made a decision for. + +

Return to the summary page. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbpreamble.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbpreamble.html new file mode 100644 index 0000000000..659b77e729 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbpreamble.html @@ -0,0 +1,10 @@ +This page contains a subset of the %(listname)s mailing list +postings that are being held for your approval. It currently shows +%(description)s + +

For each administrative request, please select the action to take, +clicking on the Submit All Data when finished. More detailed +instructions are available here. + +

You can also view a summary of all +pending requests. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbsummary.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbsummary.html new file mode 100644 index 0000000000..20ffef5846 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/admindbsummary.html @@ -0,0 +1,14 @@ +This page contains a summary of the current set of administrative +requests requiring your approval for the +%(listname)s mailing list. +First, you will find the list of pending +subscription and unsubscription requests, if any, followed by any +postings being held for your approval. + +

For each administrative request, please select the action to take, +clicking on the Submit All Data button when finished. +More detailed instructions are also +available. + +

You can also view the details of all +held postings. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/adminsubscribeack.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/adminsubscribeack.txt new file mode 100644 index 0000000000..388a3a2401 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/adminsubscribeack.txt @@ -0,0 +1,3 @@ +%(member)s has been successfully subscribed to %(listname)s. + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/adminunsubscribeack.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/adminunsubscribeack.txt new file mode 100644 index 0000000000..2ebcfeb707 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/adminunsubscribeack.txt @@ -0,0 +1,2 @@ +%(member)s has been removed from %(listname)s. + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/admlogin.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/admlogin.html new file mode 100644 index 0000000000..4dd2574c27 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/admlogin.html @@ -0,0 +1,40 @@ + + + %(listname)s %(who)s Authentication + + + +

+%(message)s + + + + + + + + + + + +
+ %(listname)s %(who)s + Authentication +
List %(who)s Password:
+
+

Important: From this point on, you + must have cookies enabled in your browser, otherwise no + administrative changes will take effect. + +

Session cookies are used in Mailman's + administrative interface so that you don't need to + re-authenticate with every administrative operation. This + cookie will expire automatically when you exit your browser, or + you can explicitly expire the cookie by hitting the + Logout link under Other Administrative + Activities (which you'll see once you successfully log in). +

+ + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/approve.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/approve.txt new file mode 100644 index 0000000000..dfb0dfb1e6 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/approve.txt @@ -0,0 +1,15 @@ +Your request to %(requestaddr)s: + + %(cmd)s + +has been forwarded to the person running the list. + +This is probably because you are trying to subscribe to a 'closed' +list. + +You will receive email notification of the list owner's decision about +your subscription request. + +Any questions about the list owner's policy should be directed to: + + %(adminaddr)s diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxentry.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxentry.html new file mode 100644 index 0000000000..f9bb57aab7 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxentry.html @@ -0,0 +1,4 @@ +
  • %(subject)s +  +%(author)s + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxfoot.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxfoot.html new file mode 100644 index 0000000000..4fd6f2dc9b --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxfoot.html @@ -0,0 +1,64 @@ + +

    + Last message date: + %(lastdate)s
    + Archived on: %(archivedate)s +

    +

    +
    +
    + This archive was generated by Pipermail %(version)s. + + +
    + + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxhead.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxhead.html new file mode 100644 index 0000000000..8171deb25b --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archidxhead.html @@ -0,0 +1,89 @@ + + + + OpenStack Open Source Cloud Computing Software » The %(listname)s %(archive)s Archive by %(archtype)s + + %(encoding)s + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + +
    + +

    %(archive)s Archives by %(archtype)s

    + +

    Starting: %(firstdate)s
    + Ending: %(lastdate)s
    + Messages: %(size)s

    +

      diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/archlistend.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archlistend.html new file mode 100644 index 0000000000..9bc052ddb4 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archlistend.html @@ -0,0 +1 @@ + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/archliststart.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archliststart.html new file mode 100644 index 0000000000..cdf5d17c41 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archliststart.html @@ -0,0 +1,4 @@ + + + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtoc.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtoc.html new file mode 100644 index 0000000000..78e87c0155 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtoc.html @@ -0,0 +1,130 @@ + + + + OpenStack Open Source Cloud Computing Software » The %(listname)s Archives + + %(meta)s + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + +
      + +

      The %(listname)s Archives

      +

      + You can get more information about this list + or you can download the full raw archive + (%(size)s). +

      + %(noarchive_msg)s + %(archive_listing_start)s + %(archive_listing)s + %(archive_listing_end)s +
      +
      + +
      +
      + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtocentry.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtocentry.html new file mode 100644 index 0000000000..00cf9c47d4 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtocentry.html @@ -0,0 +1,12 @@ + + + + + %(textlink)s + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtocnombox.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtocnombox.html new file mode 100644 index 0000000000..167adb247f --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/archtocnombox.html @@ -0,0 +1,131 @@ + + + + OpenStack Open Source Cloud Computing Software » The %(listname)s Archives + + %(meta)s + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + +
      + +

      The %(listname)s Archives

      +

      + You can get more information about this list. +

      + %(noarchive_msg)s + %(archive_listing_start)s + %(archive_listing)s + %(archive_listing_end)s + +
      +
      + + +
      +
      + + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/article.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/article.html new file mode 100644 index 0000000000..ce2b77cdd0 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/article.html @@ -0,0 +1,168 @@ + + + + + OpenStack Open Source Cloud Computing Software » Message: %(title)s + + + + + + + + + + + + + + + + + + + + + + + + + %(encoding)s + %(prev)s + %(next)s + + +
      + +
      + + +
      +

      %(subject_html)s

      + %(author_html)s + %(email_html)s +
      + %(datestr_html)s +

      +
      + +%(body)s + +
      +

      + +
      +More information about the %(listname)s +mailing list
      + + +
      +
      + + +
      +
      + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/bounce.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/bounce.txt new file mode 100644 index 0000000000..8e02cc7a50 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/bounce.txt @@ -0,0 +1,13 @@ +This is a Mailman mailing list bounce action notice: + + List: %(listname)s + Member: %(addr)s + Action: Subscription %(negative)s%(did)s. + Reason: Excessive or fatal bounces. + %(but)s + +%(reenable)s +The triggering bounce notice is attached below. + +Questions? +Contact the Mailman site administrator at %(owneraddr)s. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/checkdbs.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/checkdbs.txt new file mode 100644 index 0000000000..d53925a4d7 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/checkdbs.txt @@ -0,0 +1,7 @@ +The %(real_name)s@%(host_name)s mailing list has %(count)d request(s) +waiting for your consideration at: + + %(adminDB)s + +Please attend to this at your earliest convenience. This notice of +pending requests, if any, will be sent out daily. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/convert.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/convert.txt new file mode 100644 index 0000000000..ae17a79e02 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/convert.txt @@ -0,0 +1,34 @@ +The %(listname)s mailing list has just undergone a big change. It is +running on a new mailing list package called "Mailman". This will +hopefully solve a lot of problems that administering this list has +presented. + +How does this affect you? + +1) Mail intended for the whole list should be sent to: %(listaddr)s. + +2) You have been given an arbitrary password to prevent others from +unsubscribing you without your knowledge. It will be mailed to you in +a separate email, which you may have already received. Don't worry if +you forget this password; a reminder will be sent to you via email +every month. + +3) If you have World Wide Web access, you can use it any time to +unsubscribe from this list, to switch to and from digest mode, to +check back issues of the list (which will be available after the list +has been getting posts for a day or so), etc. The Web address for +these resources is: + + %(listinfo_url)s + +4) If you do not have WWW access, you can do these same things via +email. Send mail to %(requestaddr)s with a subject or body containing +just the word "help" (without the quotes). You will receive an +automated reply giving you further directions. + +Please address any questions or problems with this new setup to: +%(adminaddr)s. + +This message was auto-generated by Mailman %(version)s. For more +information on the Mailman software, visit the Mailman homepage at +http://www.list.org/ diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/cronpass.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/cronpass.txt new file mode 100644 index 0000000000..52ce5ea6ce --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/cronpass.txt @@ -0,0 +1,19 @@ +This is a reminder, sent out once a month, about your %(hostname)s +mailing list memberships. It includes your subscription info and how +to use it to change it or unsubscribe from a list. + +You can visit the URLs to change your membership status or +configuration, including unsubscribing, setting digest-style delivery +or disabling delivery altogether (e.g., for a vacation), and so on. + +In addition to the URL interfaces, you can also use email to make such +changes. For more info, send a message to the '-request' address of +the list (for example, %(exreq)s) containing just the word 'help' in +the message body, and an email message will be sent to you with +instructions. + +If you have questions, problems, comments, etc, send them to +%(owner)s. Thanks! + +Passwords for %(useraddr)s: + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/disabled.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/disabled.txt new file mode 100644 index 0000000000..54998a83b7 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/disabled.txt @@ -0,0 +1,25 @@ +Your membership in the mailing list %(listname)s has been disabled +%(reason)s. You will not get any more messages from this +list until you re-enable your membership. You will receive +%(noticesleft)s more reminders like this before your membership in the +list is deleted. + +To re-enable your membership, you can simply respond to this message +(leaving the Subject: line intact), or visit the confirmation page at + + %(confirmurl)s + +You can also visit your membership page at + + %(optionsurl)s + +On your membership page, you can change various delivery options such +as your email address and whether you get digests or not. As a +reminder, your membership password is + + %(password)s + +If you have any questions or problems, you can contact the list owner +at + + %(owneraddr)s diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/emptyarchive.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/emptyarchive.html new file mode 100644 index 0000000000..533b5030c7 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/emptyarchive.html @@ -0,0 +1,125 @@ + + + + OpenStack Open Source Cloud Computing Software » The %(listname)s Archives + + + + + + + + + + + + + + + + + + + +i + + + +
      + +
      + + +
      +

      The %(listname)s Archives

      +

      + No messages have been posted to this list yet, so the archives are + currently empty. You can get more information + about this list. +

      +
      +
      + + +
      +
      + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/headfoot.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/headfoot.html new file mode 100644 index 0000000000..f2dd04e060 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/headfoot.html @@ -0,0 +1,28 @@ +This text can include +Python +format strings which are resolved against list attributes. The +list of substitutions allowed are: + +
        +
      • real_name - The "pretty" name of the list; usually + the list name with capitalization. + +
      • list_name - The name by which the list is + identified in URLs, where case is significant. + +
      • host_name - The fully qualified domain name + that the list server runs on. + +
      • web_page_url - The base URL for Mailman. This + can be appended with, + e.g. listinfo/%(list_name)s to yield the + listinfo page for the mailing list. + +
      • description - The brief description of the + mailing list. + +
      • info - The full description of the mailing + list. + +
      • cgiext - The extension added to CGI scripts. +
      diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/help.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/help.txt new file mode 100644 index 0000000000..654eda3154 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/help.txt @@ -0,0 +1,33 @@ +Help for %(listname)s mailing list: + +This is email command help for version %(version)s of the "Mailman" +list manager. The following describes commands you can send to get +information about and control your subscription to Mailman lists at +this site. A command can be in the subject line or in the body of the +message. + +Note that much of the following can also be accomplished via the World +Wide Web, at: + + %(listinfo_url)s + +In particular, you can use the Web site to have your password sent to +your delivery address. + +List specific commands (subscribe, who, etc) should be sent to the +*-request address for the particular list, e.g. for the 'mailman' +list, use 'mailman-request@...'. + +About the descriptions - words in "<>"s signify REQUIRED items and +words in "[]" denote OPTIONAL items. Do not include the "<>"s or +"[]"s when you use the commands. + +The following commands are valid: + + %(commands)s + +Commands should be sent to %(requestaddr)s + +Questions and concerns for the attention of a person should be sent to + + %(adminaddr)s diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/invite.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/invite.txt new file mode 100644 index 0000000000..920c842130 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/invite.txt @@ -0,0 +1,20 @@ +Your address "%(email)s" has been invited to join the %(listname)s +mailing list at %(hostname)s by the %(listname)s mailing list owner. +You may accept the invitation by simply replying to this message, +keeping the Subject: header intact. + +You can also visit this web page: + + %(confirmurl)s + +Or you should include the following line -- and only the following +line -- in a message to %(requestaddr)s: + + confirm %(cookie)s + +Note that simply sending a `reply' to this message should work from +most mail readers. + +If you want to decline this invitation, please simply disregard this +message. If you have any questions, please send them to +%(listowner)s. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/listinfo.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/listinfo.html new file mode 100644 index 0000000000..c9e421e6cb --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/listinfo.html @@ -0,0 +1,254 @@ + + + + OpenStack Open Source Cloud Computing Software » <MM-List-Name> - <MM-List-Description> + + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + +
      +

      +

      ArchiveView by:Downloadable version
      %(archivelabel)s: + [ Thread ] + [ Subject ] + [ Author ] + [ Date ] +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + -- + +
      +

        +

      + About + + + + +
      +

      +

      To see the collection of prior postings to the list, + visit the + Archives. + +

      +
      + Using +
      + To post a message to all the list members, send email to + . + +

      You can subscribe to the list, or change your existing + subscription, in the sections below. +

      + Subscribing to +
      +

      + Subscribe to by filling out the following + form. +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Your email address: +  
        Your name (optional): 
        You may enter a + privacy password below. This provides only mild security, + but should prevent others from messing with your + subscription. Do not use a valuable password as + it will occasionally be emailed back to you in cleartext. + +

        If you choose not to enter a password, one will be + automatically generated for you, and it will be sent to + you once you've confirmed your subscription. You can + always request a mail-back of your password when you edit + your personal options. + +

        Pick a password: 
        Reenter password to confirm: 
        Which language do you prefer to display your messages?  
        Would you like to receive list mail batched in a daily + digest? + No + Yes +
        +

        +
        + +
      +
      + + Subscribers +
      + + + +

      + + + +

      +
      + +
      + +
      + +
    + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/masthead.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/masthead.txt new file mode 100644 index 0000000000..30c526ac9d --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/masthead.txt @@ -0,0 +1,13 @@ +Send %(real_name)s mailing list submissions to + %(got_list_email)s + +To subscribe or unsubscribe via the World Wide Web, visit + %(got_listinfo_url)s +or, via email, send a message with subject or body 'help' to + %(got_request_email)s + +You can reach the person managing the list at + %(got_owner_email)s + +When replying, please edit your Subject line so it is more specific than +"Re: Contents of %(real_name)s digest..." diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/newlist.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/newlist.txt new file mode 100644 index 0000000000..3362887d81 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/newlist.txt @@ -0,0 +1,35 @@ +The mailing list `%(listname)s' has just been created for you. The +following is some basic information about your mailing list. + +Your mailing list password is: + + %(password)s + +You need this password to configure your mailing list. You also need +it to handle administrative requests, such as approving mail if you +choose to run a moderated list. + +You can configure your mailing list at the following web page: + + %(admin_url)s + +The web page for users of your mailing list is: + + %(listinfo_url)s + +You can even customize these web pages from the list configuration +page. However, you do need to know HTML to be able to do this. + +There is also an email-based interface for users (not administrators) +of your list; you can get info about using it by sending a message +with just the word `help' as subject or in the body, to: + + %(requestaddr)s + +To unsubscribe a user: from the mailing list 'listinfo' web page, +click on or enter the user's email address as if you were that user. +Where that user would put in their password to unsubscribe, put in +your admin password. You can also use your password to change +member's options, including digestification, delivery disabling, etc. + +Please address all questions to %(siteowner)s. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/nomoretoday.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/nomoretoday.txt new file mode 100644 index 0000000000..1019dce348 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/nomoretoday.txt @@ -0,0 +1,8 @@ +We have received a message from your address `%(sender)s' requesting +an automated response from the %(listname)s mailing list. We have +seen %(num)s such messages from you today. In order to avoid problems +such as mail loops between email robots, we will not be sending you +any further email responses today. Please try again tomorrow. + +If you believe this message is in error, or if you have any questions, +please contact the list owner at %(owneremail)s. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/options.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/options.html new file mode 100644 index 0000000000..6fd1476016 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/options.html @@ -0,0 +1,422 @@ + + + + OpenStack Open Source Cloud Computing Software » <MM-Presentable-User> membership configuration for <MM-List-Name> + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + +
    + + + +
    + + mailing list membership configuration for + +
    +

    + + + + + +
    + 's subscription status, + password, and options for the mailing list. +
    + + + + +

    +

    + + +

    + + + + + + + + +
    + + Changing your membership information +
    You can change the address that you are subscribed + to the mailing list with by entering the new address in the + fields below. Note that a confirmation email will be sent to + the new address, and the change must be confirmed before it is + processed. + +

    Confirmations time out after about . + +

    You can also optionally set or change your real name + (i.e. John Smith). + +

    If you want to make the membership changes for all the + lists that you are subscribed to at , turn on the + Change globally check box. + +

    + + + + + + + +
    New address:
    Again to + confirm:
    +
    + + + + +
    Your name + (optional):
    +
    +

    Change globally

    + +

    + + + + + + + +
    + Unsubscribing from + Your other subscriptions +
    + Turn on the confirmation checkbox and hit this button to + unsubscribe from this mailing list. Warning: + This action will be taken immediately! +

    +

    + You can view a list of all the other mailing lists at + for which you are a member. Use this if you want to + make the same membership option changes to this other + subscriptions. + +

    +

    +
    + + + + + + +
    + Your Password +
    + +
    +

    Forgotten Your Password?

    +
    + Click this button to have your password emailed to your + membership address. +

    +

    + +
    +
    + +
    +

    Change Your Password

    + + + + + + + + +
    New + password:
    Again to + confirm:
    + + +

    Change globally. +
    +
    + +

    + + +
    + Your Subscription Options +
    + +

    +Current values are checked. + +

    Note that some of the options have a Set globally +checkbox. Checking this field will cause the changes to be made to +every mailing list that you are a member of on . Click on +List my other subscriptions above to see which other mailing +lists you are subscribed to. +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + Mail delivery

    + Set this option to Enabled to receive messages posted + to this mailing list. Set it to Disabled if you want + to stay subscribed, but don't want mail delivered to you for a + while (e.g. you're going on vacation). If you disable mail + delivery, don't forget to re-enable it when you come back; it + will not be automatically re-enabled. +

    + Enabled
    + Disabled

    + Set globally +

    + Set Digest Mode

    + If you turn digest mode on, you'll get posts bundled together + (usually one per day but possibly more on busy lists), instead + of singly when they're sent. If digest mode is changed from + on to off, you may receive one last digest. +

    + Off
    + On +
    + Get MIME or Plain Text Digests?

    + Your mail reader may or may not support MIME digests. In + general MIME digests are preferred, but if you have a problem + reading them, select plain text digests. +

    + MIME
    + Plain Text

    + Set globally +

    + Receive your own posts to the list?

    + Ordinarily, you will get a copy of every message you post to + the list. If you don't want to receive this copy, set this + option to No. +

    + No
    + Yes +
    + Receive acknowledgement mail when you send mail to + the list?

    +

    + No
    + Yes +
    + Get password reminder email for this list?

    + Once a month, you will get an email containing a password + reminder for every list at this host to which you are + subscribed. You can turn this off on a per-list basis by + selecting No for this option. If you turn off + password reminders for all the lists you are subscribed to, no + reminder email will be sent to you. +

    + No
    + Yes

    + Set globally +

    + Conceal yourself from subscriber list?

    + When someone views the list membership, your email address is + normally shown (in an obscured fashion to thwart spam + harvesters). If you do not want your email address to show up + on this membership roster at all, select Yes for this option. +

    + No
    + Yes +
    + What language do you prefer?

    +

    + +
    + Which topic categories would you like to subscribe + to?

    + By selecting one or more topics, you can filter the + traffic on the mailing list, so as to receive only a + subset of the messages. If a message matches one of + your selected topics, then you will get the message, + otherwise you will not. + +

    If a message does not match any topic, the delivery + rule depends on the setting of the option below. If + you do not select any topics of interest, you will get + all the messages sent to the mailing list. +

    + +
    + Do you want to receive messages that do not match any + topic filter?

    + + This option only takes effect if you've subscribed to + at least one topic above. It describes what the + default delivery rule is for messages that don't match + any topic filter. Selecting No says that if + the message does not match any topic filters, then you + won't get the message, while selecting Yes + says to deliver such non-matching messages to you. + +

    If no topics of interest are selected above, then + you will receive every message sent to the mailing + list. +

    + No
    + Yes +
    + Avoid duplicate copies of messages?

    + + When you are listed explicitly in the To: or + Cc: headers of a list message, you can opt to + not receive another copy from the mailing list. + Select Yes to avoid receiving copies from the + mailing list; select No to receive copies. + +

    If the list has member personalized messages + enabled, and you elect to receive copies, every copy + will have a X-Mailman-Copy: yes header added + to it. + +

    + No
    + Yes

    + Set globally +

    +
    +
    + +

    + + +

    + +
    + +
    +
    + + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/postack.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/postack.txt new file mode 100644 index 0000000000..7402e4c2a4 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/postack.txt @@ -0,0 +1,8 @@ +Your message entitled + + %(subject)s + +was successfully received by the %(listname)s mailing list. + +List info page: %(listinfo_url)s +Your preferences: %(optionsurl)s diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/postauth.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/postauth.txt new file mode 100644 index 0000000000..a10727716a --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/postauth.txt @@ -0,0 +1,13 @@ +As list administrator, your authorization is requested for the +following mailing list posting: + + List: %(listname)s@%(hostname)s + From: %(sender)s + Subject: %(subject)s + Reason: %(reason)s + +At your convenience, visit: + + %(admindb_url)s + +to approve or deny the request. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/postheld.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/postheld.txt new file mode 100644 index 0000000000..877bb40503 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/postheld.txt @@ -0,0 +1,15 @@ +Your mail to '%(listname)s' with the subject + + %(subject)s + +Is being held until the list moderator can review it for approval. + +The reason it is being held: + + %(reason)s + +Either the message will get posted to the list, or you will receive +notification of the moderator's decision. If you would like to cancel +this posting, please visit the following URL: + + %(confirmurl)s diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/private.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/private.html new file mode 100644 index 0000000000..ba0db1faf0 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/private.html @@ -0,0 +1,44 @@ + + + %(realname)s Private Archives Authentication + + + +
    +%(message)s + + + + + + + + + + + + + + + +
    + %(realname)s Private + Archives Authentication +
    Email address:
    Password:
    +
    +

    Important: From this point on, you + must have cookies enabled in your browser, otherwise + you will have to re-authenticate with every operation. + +

    Session cookies are used in Mailman's + private archive interface so that you don't need to + re-authenticate with every operation. This + cookie will expire automatically when you exit your browser, or + you can explicitly expire the cookie by visiting your + member options page and clicking the + Log out button. +

    + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/probe.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/probe.txt new file mode 100644 index 0000000000..e0ae4ff576 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/probe.txt @@ -0,0 +1,25 @@ +This is a probe message. You can ignore this message. + +The %(listname)s mailing list has received a number of bounces from you, +indicating that there may be a problem delivering messages to %(address)s. +A bounce sample is attached below. Please examine this message to make sure +there are no problems with your email address. You may want to check with +your mail administrator for more help. + +If you are reading this, you don't need to do anything to remain an enabled +member of the mailing list. If this message had bounced, you would not be +reading it, and your membership would have been disabled. Normally when you +are disabled, you receive occasional messages asking you to re-enable your +subscription. + +You can also visit your membership page at + + %(optionsurl)s + +On your membership page, you can change various delivery options such +as your email address and whether you get digests or not. + +If you have any questions or problems, you can contact the list owner +at + + %(owneraddr)s diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/refuse.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/refuse.txt new file mode 100644 index 0000000000..9b6d9bb9cb --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/refuse.txt @@ -0,0 +1,13 @@ +Your request to the %(listname)s mailing list + + %(request)s + +has been rejected by the list moderator. The moderator gave the +following reason for rejecting your request: + +"%(reason)s" + +Any questions or comments should be directed to the list administrator +at: + + %(adminaddr)s diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/roster.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/roster.html new file mode 100644 index 0000000000..42831cee41 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/roster.html @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + OpenStack Open Source Cloud Computing Software » <MM-List-Name> Subscribers + + + +
    + +
    + + +
    + +

    + + + + + + + + + + + + + + + +
    + + Subscribers +
    + +

    +

    + +

    Click on your address to visit your subscription + options page.
    (Parenthesized entries have list delivery + disabled.)

    +
    +
    + + Non-digested Members of : +
    +
    +
    + Digested + Members of : +
    +
    +

    +

    +

    +

    + +

    + +
    + +
    +
    + + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/subauth.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/subauth.txt new file mode 100644 index 0000000000..9c20c3dac3 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/subauth.txt @@ -0,0 +1,11 @@ +Your authorization is required for a mailing list subscription request +approval: + + For: %(username)s + List: %(listname)s@%(hostname)s + +At your convenience, visit: + + %(admindb_url)s + +to process the request. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/subscribe.html b/playbooks/roles/mailman-site/files/openstack/html-templates-en/subscribe.html new file mode 100644 index 0000000000..310d655747 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/subscribe.html @@ -0,0 +1,117 @@ + + +OpenStack Open Source Cloud Computing Software » <MM-List-Name> Subscription results + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + +
    +

    Subscription results

    + + +
    + + +
    + +
    +
    + + diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/subscribeack.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/subscribeack.txt new file mode 100644 index 0000000000..fad433f280 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/subscribeack.txt @@ -0,0 +1,33 @@ +Welcome to the %(real_name)s@%(host_name)s mailing list! +%(welcome)s +To post to this list, send your email to: + + %(emailaddr)s + +General information about the mailing list is at: + + %(listinfo_url)s + +If you ever want to unsubscribe or change your options (eg, switch to or +from digest mode, change your password, etc.), visit your subscription +page at: + + %(optionsurl)s +%(umbrella)s +You can also make such adjustments via email by sending a message to: + + %(real_name)s-request@%(host_name)s + +with the word `help' in the subject or body (don't include the +quotes), and you will get back a message with instructions. + +You must know your password to change your options (including changing +the password, itself) or to unsubscribe. It is: + + %(password)s + +Normally, Mailman will remind you of your %(host_name)s mailing list +passwords once every month, although you can disable this if you +prefer. This reminder will also include instructions on how to +unsubscribe or change your account options. There is also a button on +your options page that will email your current password to you. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/unsub.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/unsub.txt new file mode 100644 index 0000000000..b08f65bae2 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/unsub.txt @@ -0,0 +1,23 @@ +Mailing list removal confirmation notice for mailing list %(listname)s + +We have received a request%(remote)s for the removal of your email +address, "%(email)s" from the %(listaddr)s mailing list. To confirm +that you want to be removed from this mailing list, simply reply to +this message, keeping the Subject: header intact. Or visit this web +page: + + %(confirmurl)s + +Or include the following line -- and only the following line -- in a +message to %(requestaddr)s: + + confirm %(cookie)s + +Note that simply sending a `reply' to this message should work from +most mail readers, since that usually leaves the Subject: line in +the right form (additional "Re:" text in the Subject: is okay). + +If you do not wish to be removed from this list, please simply +disregard this message. If you think you are being maliciously +removed from the list, or have any other questions, send them to +%(listadmin)s. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/unsubauth.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/unsubauth.txt new file mode 100644 index 0000000000..920f6c1b61 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/unsubauth.txt @@ -0,0 +1,11 @@ +Your authorization is required for a mailing list unsubscription +request approval: + + By: %(username)s + From: %(listname)s@%(hostname)s + +At your convenience, visit: + + %(admindb_url)s + +to process the request. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/userpass.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/userpass.txt new file mode 100644 index 0000000000..2a53a846ea --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/userpass.txt @@ -0,0 +1,24 @@ +You, or someone posing as you, has requested a password reminder for +your membership on the mailing list %(fqdn_lname)s. You will need +this password in order to change your membership options (e.g. do you +want regular delivery or digest delivery), and having this password +makes it easier for you to unsubscribe from the mailing list. + +You are subscribed with the address: %(user)s + +Your %(listname)s password is: %(password)s + +To make changes to your membership options, log in and visit your +options web page: + + %(options_url)s + +You can also make such changes via email by sending a message to: + + %(requestaddr)s + +with the text "help" in the subject or body. The automatic reply will +contain more detailed instructions. + +Questions or comments? Please send them to the %(listname)s mailing +list administrator at %(owneraddr)s. diff --git a/playbooks/roles/mailman-site/files/openstack/html-templates-en/verify.txt b/playbooks/roles/mailman-site/files/openstack/html-templates-en/verify.txt new file mode 100644 index 0000000000..8e767f0723 --- /dev/null +++ b/playbooks/roles/mailman-site/files/openstack/html-templates-en/verify.txt @@ -0,0 +1,22 @@ +Mailing list subscription confirmation notice for mailing list %(listname)s + +We have received a request%(remote)s for subscription of your email +address, "%(email)s", to the %(listaddr)s mailing list. To confirm +that you want to be added to this mailing list, simply reply to this +message, keeping the Subject: header intact. Or visit this web page: + + %(confirmurl)s + +Or include the following line -- and only the following line -- in a +message to %(requestaddr)s: + + confirm %(cookie)s + +Note that simply sending a `reply' to this message should work from +most mail readers, since that usually leaves the Subject: line in +the right form (additional "Re:" text in the Subject: is okay). + +If you do not wish to be subscribed to this list, please simply +disregard this message. If you think you are being maliciously +subscribed to the list, or have any other questions, send them to +%(listadmin)s. diff --git a/playbooks/roles/mailman-site/handlers/main.yaml b/playbooks/roles/mailman-site/handlers/main.yaml new file mode 100644 index 0000000000..47b3fe00e3 --- /dev/null +++ b/playbooks/roles/mailman-site/handlers/main.yaml @@ -0,0 +1,4 @@ +- name: mailman site reload apache2 + service: + name: apache2 + state: reloaded diff --git a/playbooks/roles/mailman-site/tasks/main.yaml b/playbooks/roles/mailman-site/tasks/main.yaml new file mode 100644 index 0000000000..4395ddacf4 --- /dev/null +++ b/playbooks/roles/mailman-site/tasks/main.yaml @@ -0,0 +1,108 @@ +- name: Set mailman site root fact + set_fact: + mm_site_root: "/srv/mailman/{{ mailman_site.name }}" + cacheable: no + +- name: Create mm site dirs + file: + path: "{{ inner_site_dir }}" + state: directory + owner: list + group: list + mode: '2775' + loop: + - "{{ mm_site_root }}/" + - "{{ mm_site_root }}/etc" + - "{{ mm_site_root }}/lists" + - "{{ mm_site_root }}/logs" + - "{{ mm_site_root }}/locks" + - "{{ mm_site_root }}/data" + - "{{ mm_site_root }}/spam" + - "{{ mm_site_root }}/mail" + - "{{ mm_site_root }}/run" + - "{{ mm_site_root }}/archives" + - "{{ mm_site_root }}/archives/public" + - "{{ mm_site_root }}/archives/private" + - "{{ mm_site_root }}/templates" + - "{{ mm_site_root }}/qfiles" + - "{{ mm_site_root }}/qfiles/in" + - "{{ mm_site_root }}/qfiles/out" + - "{{ mm_site_root }}/qfiles/commands" + - "{{ mm_site_root }}/qfiles/bounces" + - "{{ mm_site_root }}/qfiles/news" + - "{{ mm_site_root }}/qfiles/archive" + - "{{ mm_site_root }}/qfiles/shunt" + - "{{ mm_site_root }}/qfiles/virgin" + - "{{ mm_site_root }}/qfiles/bad" + - "{{ mm_site_root }}/qfiles/retry" + - "{{ mm_site_root }}/qfiles/maildir" + loop_control: + loop_var: inner_site_dir + +- name: Link html templates into site + file: + state: link + src: "/usr/share/mailman/{{ site_language }}" + dest: "{{ mm_site_root }}/templates/{{ site_language }}" + owner: root + group: root + loop: "{{ mailman_site.install_languages }}" + loop_control: + loop_var: site_language + +- name: Create openstack specific en templates dir + file: + state: directory + path: /srv/mailman/openstack/templates/en + owner: root + group: list + mode: '0755' + when: mailman_site.name == "openstack" +- name: Copy openstack specific en templates into site + synchronize: + src: openstack/html-templates-en/ + dest: /srv/mailman/openstack/templates/en + when: mailman_site.name == "openstack" + +- name: Create site specific config + template: + src: mm_site_cfg.py.j2 + dest: "{{ mm_site_root }}/etc/mm_cfg_local.py" + owner: root + group: root + mode: '0444' + +- name: Create normal mailman vhost config + template: + src: mailman_multihost.vhost.j2 + dest: "/etc/apache2/sites-enabled/50-{{ mailman_site.listdomain }}.conf" + owner: root + group: root + mode: '0644' + notify: mailman site reload apache2 + +- name: Create site init script + template: + src: mailman.init.j2 + dest: "/etc/init.d/mailman-{{ mailman_site.name }}" + owner: root + group: root + mode: '0755' + +- name: Enable mailman site service + service: + name: "mailman-{{ mailman_site.name }}" + enabled: yes + +- name: Create mailman site lists + include_role: + name: mailman-list + vars: + mm_site_name: "{{ mailman_site.name }}" + mm_list_name: "{{ site_list.name }}" + mm_list_description: "{{ site_list.description }}" + mm_list_admin: "{{ site_list.admin }}" + mm_list_password: "{{ site_list.password }}" + loop: "{{ mailman_site.lists }}" + loop_control: + loop_var: site_list diff --git a/playbooks/roles/mailman-site/templates/mailman.init.j2 b/playbooks/roles/mailman-site/templates/mailman.init.j2 new file mode 100644 index 0000000000..20f5a2b1d4 --- /dev/null +++ b/playbooks/roles/mailman-site/templates/mailman.init.j2 @@ -0,0 +1,116 @@ +#! /bin/sh +# +# mailman-{{ mailman_site.name }} starts up the master queue runner for mailman +# +# Based on skeleton originally by Miquel van Smoorenburg and Ian Murdock, +# customisations by Tollef Fog Heen and Thijs Kinkhorst for Debian. +# +### BEGIN INIT INFO +# Provides: mailman-qrunner-{{ mailman_site.name }} +# Required-Start: $syslog $local_fs $remote_fs $named $network +# Required-Stop: $syslog $local_fs $remote_fs $named $network +# Should-Start: +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: +# Short-Description: Mailman Master Queue Runner +# Description: Starts and stops the Mailman queue runners, used to +# manage the various message queues within the Mailman +# mailing list manager. +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/lib/mailman/bin/mailmanctl +export MAILMAN_SITE_DIR=/srv/mailman/{{ mailman_site.name }} +PIDFILE=$MAILMAN_SITE_DIR/run/mailman.pid + + +test -x $DAEMON || exit 0 + +set -e + +if ! [ -d /var/run/mailman ]; then + install -d -o list -g list /var/run/mailman +fi + +if ! [ -d /var/lock/mailman ]; then + install -d -o root -g list -m 2775 /var/lock/mailman +fi + +. /lib/lsb/init-functions + +# In rare upgrading cycles python might not be available at some point. +# Do not break the upgrade in that case. +if ! [ -x /usr/bin/python ]; then + log_warning_msg "Python interpreter not available, exiting." + exit 0; +fi + +# Just a newline. +nl=' +' + +case "$1" in + start) + SITE_LIST=$( sed -rne "s/^[[:space:]]*MAILMAN_SITE_LIST[[:space:]]*=[[:space:]]*(['\"])([^'\"]+)\\1/\\2/p" /etc/mailman/mm_cfg.py ) + [ -n "$SITE_LIST" ] || SITE_LIST='mailman' + case "$nl$(/var/lib/mailman/bin/list_lists -b)$nl" in + (*$nl$SITE_LIST$nl*) ;; + (*) + log_warning_msg "Site list for mailman missing (looking for list named '${SITE_LIST}')." + log_warning_msg "Please create it; until then, mailman will refuse to start." + exit 0 ;; + esac + log_daemon_msg "Starting Mailman master qrunner" "mailmanctl" + if $DAEMON -s -q start; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping Mailman master qrunner" "mailmanctl" + if $DAEMON -q stop; then + rm -f $PIDFILE + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + reload) + log_begin_msg "Reloading Mailman master qrunner configuration" + if $DAEMON -q restart; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + restart|force-reload) + PID=`cat $PIDFILE 2>/dev/null` || true + log_daemon_msg "Restarting Mailman master qrunner" "mailmanctl" + $DAEMON -q stop + if test -n "$PID" && kill -0 $PID 2>/dev/null ; then + log_action_begin_msg "Waiting" + for cnt in `seq 1 5`; do + sleep 1 + kill -0 $PID 2>/dev/null || break + done; + if kill -0 $PID 2>/dev/null ; then + log_action_end_msg 1 + else + log_action_end_msg 0 + fi + fi + if $DAEMON -q start; then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + *) + echo "Usage: /etc/init.d/mailman {start|stop|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/playbooks/roles/mailman-site/templates/mailman_multihost.vhost.j2 b/playbooks/roles/mailman-site/templates/mailman_multihost.vhost.j2 new file mode 100644 index 0000000000..8f5e7dbc57 --- /dev/null +++ b/playbooks/roles/mailman-site/templates/mailman_multihost.vhost.j2 @@ -0,0 +1,62 @@ + + ServerName {{ mailman_site.listdomain }} + + ErrorLog ${APACHE_LOG_DIR}/{{ mailman_site.listdomain }}-error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog ${APACHE_LOG_DIR}/{{ mailman_site.listdomain }}-access.log combined + + DocumentRoot /var/www + +RewriteEngine on +RewriteRule ^/$ /cgi-bin/mailman/listinfo [R] + +# We can find mailman here: +ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/ +# And the public archives: +Alias /pipermail/ /srv/mailman/{{ mailman_site.name }}/archives/public/ +# Logos: +Alias /images/mailman/ /usr/share/images/mailman/ + +# Use this if you don't want the "cgi-bin" component in your URL: +# In case you want to access mailman through a shorter URL you should enable +# this: +#ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/ +# In this case you need to set the DEFAULT_URL_PATTERN in +# /etc/mailman/mm_cfg.py to http://%s/mailman/ for the cookie +# authentication code to work. Note that you need to change the base +# URL for all the already-created lists as well. + + + AllowOverride None + Options ExecCGI + AddHandler cgi-script .cgi + SetEnv MAILMAN_SITE_DIR /srv/mailman/{{ mailman_site.name }} + Order allow,deny + Allow from all + = 2.4> + Require all granted + + + + Options FollowSymlinks + AllowOverride None + Order allow,deny + Allow from all + = 2.4> + Require all granted + + + + AllowOverride None + Order allow,deny + Allow from all + = 2.4> + Require all granted + + + + diff --git a/playbooks/roles/mailman-site/templates/mm_site_cfg.py.j2 b/playbooks/roles/mailman-site/templates/mm_site_cfg.py.j2 new file mode 100644 index 0000000000..74cdb8dc7b --- /dev/null +++ b/playbooks/roles/mailman-site/templates/mm_site_cfg.py.j2 @@ -0,0 +1,153 @@ +# -*- python -*- + +# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA + + +"""This is the module which takes your site-specific settings. + +From a raw distribution it should be copied to mm_cfg.py. If you +already have an mm_cfg.py, be careful to add in only the new settings +you want. The complete set of distributed defaults, with annotation, +are in ./Defaults. In mm_cfg, override only those you want to +change, after the + + from Defaults import * + +line (see below). + +Note that these are just default settings - many can be overridden via the +admin and user interfaces on a per-list or per-user basis. + +Note also that some of the settings are resolved against the active list +setting by using the value as a format string against the +list-instance-object's dictionary - see the distributed value of +DEFAULT_MSG_FOOTER for an example.""" + + +####################################################### +# Here's where we get the distributed defaults. # + +from Mailman.Defaults import * + +############################################################## +# Put YOUR site-specific configuration below, in mm_cfg.py . # +# See Defaults.py for explanations of the values. # + +#------------------------------------------------------------- +# The name of the list Mailman uses to send password reminders +# and similar. Don't change if you want mailman-owner to be +# a valid local part. +MAILMAN_SITE_LIST = 'mailman' + +#------------------------------------------------------------- +# If you change these, you have to configure your http server +# accordingly (Alias and ScriptAlias directives in most httpds) +DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/' +PRIVATE_ARCHIVE_URL = '/cgi-bin/mailman/private' +IMAGE_LOGOS = '/images/mailman/' + +#------------------------------------------------------------- +# Default domain for email addresses of newly created MLs +DEFAULT_EMAIL_HOST = '{{ mailman_site.listdomain }}' +#------------------------------------------------------------- +# Default host for web interface of newly created MLs +DEFAULT_URL_HOST = '{{ mailman_site.listdomain }}' +#------------------------------------------------------------- +# Required when setting any of its arguments. +add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) + +#------------------------------------------------------------- +# The default language for this server. +DEFAULT_SERVER_LANGUAGE = 'en' + +#------------------------------------------------------------- +# Iirc this was used in pre 2.1, leave it for now +USE_ENVELOPE_SENDER = 0 # Still used? + +#------------------------------------------------------------- +# Unset send_reminders on newly created lists +DEFAULT_SEND_REMINDERS = 0 + +#------------------------------------------------------------- +# Uncomment this if you configured your MTA such that it +# automatically recognizes newly created lists. +# (see /usr/share/doc/mailman/README.Exim4.Debian or +# /usr/share/mailman/postfix-to-mailman.py) +MTA=None # Misnomer, suppresses alias output on newlist + +#------------------------------------------------------------- +# Uncomment if you use Postfix virtual domains (but not +# postfix-to-mailman.py), but be sure to see +# /usr/share/doc/mailman/README.Debian first. +# MTA='Postfix' + +#------------------------------------------------------------- +# Uncomment if you want to filter mail with SpamAssassin. For +# more information please visit this website: +# http://www.jamesh.id.au/articles/mailman-spamassassin/ +# GLOBAL_PIPELINE.insert(1, 'SpamAssassin') + +# Note - if you're looking for something that is imported from mm_cfg, but you +# didn't find it above, it's probably in /usr/lib/mailman/Mailman/Defaults.py. + +# Enable VERP, but let Exim create the VERP addresses since it's +# more efficient. --jeblair + +VERP_PASSWORD_REMINDERS = 1 +VERP_PERSONALIZED_DELIVERIES = 1 +VERP_CONFIRMATIONS = 1 +VERP_DELIVERY_INTERVAL = 0 + +# Make membership viewable by admin only by default (lp bug 1021493) +# Private_roster == 0: anyone can see, 1: members only, 2: admin only. +DEFAULT_PRIVATE_ROSTER = 2 + +# All `normal' messages which are delivered to the entire list membership go +# through this pipeline of handler modules. Lists themselves can override the +# global pipeline by defining a `pipeline' attribute. + +# AvoidDuplicates is removed because it modifies the CC header, which +# can break DKIM signatures. --jeblair +GLOBAL_PIPELINE = [ + # These are the modules that do tasks common to all delivery paths. + 'SpamDetect', + 'Approve', + 'Replybot', + 'Moderate', + 'Hold', + 'MimeDel', + 'Scrubber', + 'Emergency', + 'Tagger', + 'CalcRecips', + 'Cleanse', + 'CleanseDKIM', + 'CookHeaders', + # And now we send the message to the digest mbox file, and to the arch and + # news queues. Runners will provide further processing of the message, + # specific to those delivery paths. + 'ToDigest', + 'ToArchive', + 'ToUsenet', + # Now we'll do a few extra things specific to the member delivery + # (outgoing) path, finally leaving the message in the outgoing queue. + 'AfterDelivery', + 'Acknowledge', + 'WrapMessage', + 'ToOutgoing', + ] diff --git a/playbooks/roles/mailman/README.rst b/playbooks/roles/mailman/README.rst new file mode 100644 index 0000000000..d25870564d --- /dev/null +++ b/playbooks/roles/mailman/README.rst @@ -0,0 +1 @@ +Role to configure mailman diff --git a/playbooks/roles/mailman/files/index.html b/playbooks/roles/mailman/files/index.html new file mode 100644 index 0000000000..1c70d95348 --- /dev/null +++ b/playbooks/roles/mailman/files/index.html @@ -0,0 +1,4 @@ +

    It works!

    +

    This is the default web page for this server.

    +

    The web server software is running but no content has been added, yet.

    + diff --git a/playbooks/roles/mailman/files/mk-archives-index b/playbooks/roles/mailman/files/mk-archives-index new file mode 100755 index 0000000000..a814ad8a0c --- /dev/null +++ b/playbooks/roles/mailman/files/mk-archives-index @@ -0,0 +1,9 @@ +#!/bin/sh + +for site in `cut -d: -f1 /etc/mailman/sites | sort`; do + echo "$site:" + dir=`grep ^${site}: /etc/mailman/sites | cut -d' ' -f2` + for ml in `ls ${dir}/archives/public/ | sort`; do + echo " - $ml" + done +done diff --git a/playbooks/roles/mailman/files/mm_cfg_multihost.py b/playbooks/roles/mailman/files/mm_cfg_multihost.py new file mode 100644 index 0000000000..442f719958 --- /dev/null +++ b/playbooks/roles/mailman/files/mm_cfg_multihost.py @@ -0,0 +1,45 @@ +import os +import sys + +if 'MAILMAN_SITE_DIR' not in os.environ: + print("Please set MAILMAN_SITE_DIR") + # Exit 0 to avoid confusing the dpkg scripts + sys.exit(0) + +sys.path.insert(0, os.path.join(os.environ['MAILMAN_SITE_DIR'], 'etc')) +from mm_cfg_local import * + +VAR_PREFIX = os.environ['MAILMAN_SITE_DIR'] + +# Useful directories +LIST_DATA_DIR = os.path.join(VAR_PREFIX, 'lists') +LOG_DIR = os.path.join(VAR_PREFIX, 'logs') +LOCK_DIR = os.path.join(VAR_PREFIX, 'locks') +DATA_DIR = os.path.join(VAR_PREFIX, 'data') +SPAM_DIR = os.path.join(VAR_PREFIX, 'spam') +WRAPPER_DIR = os.path.join(EXEC_PREFIX, 'mail') +BIN_DIR = os.path.join(PREFIX, 'bin') +SCRIPTS_DIR = os.path.join(PREFIX, 'scripts') +TEMPLATE_DIR = os.path.join(VAR_PREFIX, 'templates') +MESSAGES_DIR = os.path.join(PREFIX, 'messages') +PUBLIC_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'public') +PRIVATE_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'private') + +# Directories used by the qrunner subsystem +QUEUE_DIR = os.path.join(VAR_PREFIX, 'qfiles') +INQUEUE_DIR = os.path.join(QUEUE_DIR, 'in') +OUTQUEUE_DIR = os.path.join(QUEUE_DIR, 'out') +CMDQUEUE_DIR = os.path.join(QUEUE_DIR, 'commands') +BOUNCEQUEUE_DIR = os.path.join(QUEUE_DIR, 'bounces') +NEWSQUEUE_DIR = os.path.join(QUEUE_DIR, 'news') +ARCHQUEUE_DIR = os.path.join(QUEUE_DIR, 'archive') +SHUNTQUEUE_DIR = os.path.join(QUEUE_DIR, 'shunt') +VIRGINQUEUE_DIR = os.path.join(QUEUE_DIR, 'virgin') +BADQUEUE_DIR = os.path.join(QUEUE_DIR, 'bad') +RETRYQUEUE_DIR = os.path.join(QUEUE_DIR, 'retry') +MAILDIR_DIR = os.path.join(QUEUE_DIR, 'maildir') + +# Other useful files +PIDFILE = os.path.join(VAR_PREFIX, 'run', 'mailman.pid') +SITE_PW_FILE = os.path.join(DATA_DIR, 'adm.pw') +LISTCREATOR_PW_FILE = os.path.join(DATA_DIR, 'creator.pw') diff --git a/playbooks/roles/mailman/files/robots.txt b/playbooks/roles/mailman/files/robots.txt new file mode 100644 index 0000000000..a0ab15bd9c --- /dev/null +++ b/playbooks/roles/mailman/files/robots.txt @@ -0,0 +1,2 @@ +User-agent: SemrushBot +Disallow: / diff --git a/playbooks/roles/mailman/handlers/main.yaml b/playbooks/roles/mailman/handlers/main.yaml new file mode 100644 index 0000000000..18f5b3bbc9 --- /dev/null +++ b/playbooks/roles/mailman/handlers/main.yaml @@ -0,0 +1,9 @@ +- name: mailman restart apache2 + service: + name: apache2 + state: restarted + +- name: mailman reload apache2 + service: + name: apache2 + state: reloaded diff --git a/playbooks/roles/mailman/tasks/main.yaml b/playbooks/roles/mailman/tasks/main.yaml new file mode 100644 index 0000000000..32f0fcad2d --- /dev/null +++ b/playbooks/roles/mailman/tasks/main.yaml @@ -0,0 +1,128 @@ +- name: Install apache2 + package: + name: + - apache2 + - apache2-utils + state: present + +- name: Apache modules + apache2_module: + state: present + name: "{{ a2_mod }}" + loop: + - rewrite + - cgid + - ssl + loop_control: + loop_var: a2_mod + notify: mailman restart apache2 + +- name: Install mailman + package: + name: + - mailman + state: present + +# Install index.html, robots.txt +- name: Install mailman index.html + copy: + src: index.html + dest: /var/www/index.html + owner: root + group: root + mode: '0444' + +- name: Install mailman robots.txt + copy: + src: robots.txt + dest: /var/www/robots.txt + owner: root + group: root + mode: '0444' + +- name: multihost mailman configs + block: + - name: Create multihost dir + file: + path: /srv/mailman + state: directory + owner: root + group: root + mode: '0755' + - name: Install multihost mailman config + copy: + src: mm_cfg_multihost.py + dest: /etc/mailman/mm_cfg.py + owner: root + group: root + mode: '0444' + - name: Install mailman mk-archives-index + copy: + src: mk-archives-index + dest: /usr/local/sbin/mk-archives-index + owner: root + group: root + mode: '0744' + - name: Set cron PATH for mk-archives-index + cron: + name: PATH + env: yes + job: /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin + - name: Enable mk-archives-index cron + cron: + name: "mk-archives-index cron" + state: present + job: mk-archives-index > /var/www/archives.yaml + minute: "0" + hour: "0" + - name: Create mm sites file + template: + src: sites.j2 + dest: /etc/mailman/sites + owner: root + group: root + mode: '0444' + - name: Create mailman sites and lists + include_role: + name: mailman-site + vars: + mailman_site: "{{ site }}" + loop: "{{ mailman_sites }}" + loop_control: + loop_var: site + when: mailman_multihost + +- name: normal mailman configs + block: + - name: Install normal mailman config + template: + src: mm_cfg.py.j2 + dest: /etc/mailman/mm_cfg.py + owner: root + group: root + mode: '0444' + - name: Create normal mailman vhost config + template: + src: mailman.vhost.j2 + dest: "/etc/apache2/sites-enabled/50-{{ mailman_listdomain }}.conf" + owner: root + group: root + mode: '0644' + notify: mailman reload apache2 + - name: Enable mailman site service + service: + name: "mailman" + enabled: yes + - name: Create mailman site lists + include_role: + name: mailman-list + vars: + mm_site_name: "_default" + mm_list_name: "{{ list.name }}" + mm_list_description: "{{ list.description }}" + mm_list_admin: "{{ list.admin }}" + mm_list_password: "{{ list.password }}" + loop: "{{ mailman_lists }}" + loop_control: + loop_var: list + when: not mailman_multihost diff --git a/playbooks/roles/mailman/templates/mailman.vhost.j2 b/playbooks/roles/mailman/templates/mailman.vhost.j2 new file mode 100644 index 0000000000..eae8a32a83 --- /dev/null +++ b/playbooks/roles/mailman/templates/mailman.vhost.j2 @@ -0,0 +1,61 @@ + + ServerName {{ mailman_listdomain }} + + ErrorLog ${APACHE_LOG_DIR}/{{ mailman_listdomain }}-error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog ${APACHE_LOG_DIR}/{{ mailman_listdomain }}-access.log combined + + DocumentRoot /var/www + +RewriteEngine on +RewriteRule ^/$ /cgi-bin/mailman/listinfo [R] + +# We can find mailman here: +ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/ +# And the public archives: +Alias /pipermail/ /var/lib/mailman/archives/public/ +# Logos: +Alias /images/mailman/ /usr/share/images/mailman/ + +# Use this if you don't want the "cgi-bin" component in your URL: +# In case you want to access mailman through a shorter URL you should enable +# this: +#ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/ +# In this case you need to set the DEFAULT_URL_PATTERN in +# /etc/mailman/mm_cfg.py to http://%s/mailman/ for the cookie +# authentication code to work. Note that you need to change the base +# URL for all the already-created lists as well. + + + AllowOverride None + Options ExecCGI + AddHandler cgi-script .cgi + Order allow,deny + Allow from all + = 2.4> + Require all granted + + + + Options FollowSymlinks + AllowOverride None + Order allow,deny + Allow from all + = 2.4> + Require all granted + + + + AllowOverride None + Order allow,deny + Allow from all + = 2.4> + Require all granted + + + + diff --git a/playbooks/roles/mailman/templates/mm_cfg.py.j2 b/playbooks/roles/mailman/templates/mm_cfg.py.j2 new file mode 100644 index 0000000000..1a8516109f --- /dev/null +++ b/playbooks/roles/mailman/templates/mm_cfg.py.j2 @@ -0,0 +1,119 @@ +# -*- python -*- + +# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA + + +"""This is the module which takes your site-specific settings. + +From a raw distribution it should be copied to mm_cfg.py. If you +already have an mm_cfg.py, be careful to add in only the new settings +you want. The complete set of distributed defaults, with annotation, +are in ./Defaults. In mm_cfg, override only those you want to +change, after the + + from Defaults import * + +line (see below). + +Note that these are just default settings - many can be overridden via the +admin and user interfaces on a per-list or per-user basis. + +Note also that some of the settings are resolved against the active list +setting by using the value as a format string against the +list-instance-object's dictionary - see the distributed value of +DEFAULT_MSG_FOOTER for an example.""" + + +####################################################### +# Here's where we get the distributed defaults. # + +from Defaults import * + +############################################################## +# Put YOUR site-specific configuration below, in mm_cfg.py . # +# See Defaults.py for explanations of the values. # + +#------------------------------------------------------------- +# The name of the list Mailman uses to send password reminders +# and similar. Don't change if you want mailman-owner to be +# a valid local part. +MAILMAN_SITE_LIST = 'mailman' + +#------------------------------------------------------------- +# If you change these, you have to configure your http server +# accordingly (Alias and ScriptAlias directives in most httpds) +DEFAULT_URL_PATTERN = 'http://%s/cgi-bin/mailman/' +PRIVATE_ARCHIVE_URL = '/cgi-bin/mailman/private' +IMAGE_LOGOS = '/images/mailman/' + +#------------------------------------------------------------- +# Default domain for email addresses of newly created MLs +DEFAULT_EMAIL_HOST = '{{ mailman_listdomain }}' +#------------------------------------------------------------- +# Default host for web interface of newly created MLs +DEFAULT_URL_HOST = '{{ mailman_listdomain }}' +#------------------------------------------------------------- +# Required when setting any of its arguments. +add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) + +#------------------------------------------------------------- +# The default language for this server. +DEFAULT_SERVER_LANGUAGE = 'en' + +#------------------------------------------------------------- +# Iirc this was used in pre 2.1, leave it for now +USE_ENVELOPE_SENDER = 0 # Still used? + +#------------------------------------------------------------- +# Unset send_reminders on newly created lists +DEFAULT_SEND_REMINDERS = 0 + +#------------------------------------------------------------- +# Uncomment this if you configured your MTA such that it +# automatically recognizes newly created lists. +# (see /usr/share/doc/mailman/README.Exim4.Debian or +# /usr/share/mailman/postfix-to-mailman.py) +MTA=None # Misnomer, suppresses alias output on newlist + +#------------------------------------------------------------- +# Uncomment if you use Postfix virtual domains (but not +# postfix-to-mailman.py), but be sure to see +# /usr/share/doc/mailman/README.Debian first. +# MTA='Postfix' + +#------------------------------------------------------------- +# Uncomment if you want to filter mail with SpamAssassin. For +# more information please visit this website: +# http://www.jamesh.id.au/articles/mailman-spamassassin/ +# GLOBAL_PIPELINE.insert(1, 'SpamAssassin') + +# Note - if you're looking for something that is imported from mm_cfg, but you +# didn't find it above, it's probably in /usr/lib/mailman/Mailman/Defaults.py. + +# Enable VERP, but let Exim create the VERP addresses since it's +# more efficient. --jeblair + +VERP_PASSWORD_REMINDERS = 1 +VERP_PERSONALIZED_DELIVERIES = 1 +VERP_CONFIRMATIONS = 1 +VERP_DELIVERY_INTERVAL = 0 + +# Make membership viewable by admin only by default (lp bug 1021493) +# Private_roster == 0: anyone can see, 1: members only, 2: admin only. +DEFAULT_PRIVATE_ROSTER = 2 + diff --git a/playbooks/roles/mailman/templates/sites.j2 b/playbooks/roles/mailman/templates/sites.j2 new file mode 100644 index 0000000000..b1071f363c --- /dev/null +++ b/playbooks/roles/mailman/templates/sites.j2 @@ -0,0 +1,3 @@ +{% for site in mailman_sites %} +{{ site.listdomain }}: /srv/mailman/{{ site.name }} +{% endfor %} diff --git a/playbooks/service-lists.yaml b/playbooks/service-lists.yaml new file mode 100644 index 0000000000..7595f720f9 --- /dev/null +++ b/playbooks/service-lists.yaml @@ -0,0 +1,5 @@ +- hosts: "mailman:!disabled" + name: "Configure mailman servers" + roles: + - iptables + - mailman diff --git a/playbooks/zuul/run-base.yaml b/playbooks/zuul/run-base.yaml index 4ee2c25286..642627b181 100644 --- a/playbooks/zuul/run-base.yaml +++ b/playbooks/zuul/run-base.yaml @@ -79,6 +79,7 @@ - host_vars/letsencrypt01.opendev.org.yaml - host_vars/letsencrypt02.opendev.org.yaml - host_vars/lists.openstack.org.yaml + - host_vars/lists.katacontainers.io.yaml - host_vars/gitea99.opendev.org.yaml - host_vars/grafana01.opendev.org.yaml - host_vars/mirror01.openafs.provider.opendev.org.yaml diff --git a/playbooks/zuul/templates/host_vars/lists.katacontainers.io.yaml.j2 b/playbooks/zuul/templates/host_vars/lists.katacontainers.io.yaml.j2 new file mode 100644 index 0000000000..04184d0a99 --- /dev/null +++ b/playbooks/zuul/templates/host_vars/lists.katacontainers.io.yaml.j2 @@ -0,0 +1,2 @@ +mailman_list_password: notarealpassword +mailman_test_mode: true diff --git a/playbooks/zuul/templates/host_vars/lists.openstack.org.yaml.j2 b/playbooks/zuul/templates/host_vars/lists.openstack.org.yaml.j2 index 2d38e6c9a3..04184d0a99 100644 --- a/playbooks/zuul/templates/host_vars/lists.openstack.org.yaml.j2 +++ b/playbooks/zuul/templates/host_vars/lists.openstack.org.yaml.j2 @@ -1 +1,2 @@ -listpassword: notarealpassword +mailman_list_password: notarealpassword +mailman_test_mode: true diff --git a/testinfra/test_lists_k_i.py b/testinfra/test_lists_k_i.py new file mode 100644 index 0000000000..6584461f3f --- /dev/null +++ b/testinfra/test_lists_k_i.py @@ -0,0 +1,17 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +testinfra_hosts = ['lists.katacontainers.io'] + +def test_mm_list_is_present(host): + cmd = host.run('list_lists --bare') + assert 'kata-dev' in cmd.stdout diff --git a/testinfra/test_lists_o_o.py b/testinfra/test_lists_o_o.py new file mode 100644 index 0000000000..0eff468de4 --- /dev/null +++ b/testinfra/test_lists_o_o.py @@ -0,0 +1,29 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +testinfra_hosts = ['lists.openstack.org'] + +def test_mm_list_is_present(host): + cmd = host.run('MAILMAN_SITE_DIR=/srv/mailman/airship list_lists --bare') + assert 'airship-discuss' in cmd.stdout + + cmd = host.run('MAILMAN_SITE_DIR=/srv/mailman/opendev list_lists --bare') + assert 'service-discuss' in cmd.stdout + + cmd = host.run('MAILMAN_SITE_DIR=/srv/mailman/openstack list_lists --bare') + assert 'openstack-discuss' in cmd.stdout + + cmd = host.run('MAILMAN_SITE_DIR=/srv/mailman/starlingx list_lists --bare') + assert 'starlingx-discuss' in cmd.stdout + + cmd = host.run('MAILMAN_SITE_DIR=/srv/mailman/zuul list_lists --bare') + assert 'zuul-discuss' in cmd.stdout diff --git a/zuul.d/system-config-run.yaml b/zuul.d/system-config-run.yaml index f692ef9a02..ceecbad3c0 100644 --- a/zuul.d/system-config-run.yaml +++ b/zuul.d/system-config-run.yaml @@ -204,20 +204,25 @@ label: ubuntu-bionic - name: lists.openstack.org label: ubuntu-xenial + - name: lists.katacontainers.io + label: ubuntu-xenial required-projects: - - opendev/ansible-role-puppet - opendev/system-config files: - playbooks/install-ansible.yaml - - modules/openstack_project/manifests/lists.pp - inventory/service/host_vars/lists.openstack.org.yaml - - inventory/service/group_vars/puppet - - playbooks/roles/run-puppet/ - - playbooks/roles/install-ansible-roles/ + - inventory/service/host_vars/lists.katacontainers.io.yaml + - inventory/service/group_vars/mailman.yaml - playbooks/roles/base/exim + - playbooks/roles/mailman + - playbooks/service-lists.yaml + - playbooks/zuul/templates/host_vars/lists.openstack.org.yaml.j2 + - playbooks/zuul/templates/host_vars/lists.katacontainers.io.yaml.j2 vars: run_playbooks: - - playbooks/remote_puppet_else.yaml + - playbooks/service-lists.yaml + # Run this twice to check idempotency + - playbooks/service-lists.yaml - job: name: system-config-run-nodepool