Skip to content

Commit

Permalink
Merge pull request #44 from systemli/debian-bookworm
Browse files Browse the repository at this point in the history
Add Debian 12 bookworm support; drop Debian 10 buster support
  • Loading branch information
nevart authored Sep 13, 2023
2 parents 29b5a65 + fe6a017 commit 4e49d67
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
name: Integration
uses: systemli/github-ansible-workflow/.github/workflows/[email protected]
with:
distros: '[ "debian11", "debian10" ]'
distros: '[ "debian12", "debian11" ]'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ molecule test
Requires Molecule, Vagrant and `python-vagrant` to be installed.For developing and testing the role we use Travis CI, Molecule and Vagrant. On the local environment you can easily test the role with


This will spin up a virtual machine with Debian Buster. Afterwards you can connect to the Schleuder
This will spin up a virtual machine with Debian Bookworm. Afterwards you can connect to the Schleuder
web interface via:

```
Expand Down
6 changes: 5 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ schleuder_bounces_drop_all: "false"
schleuder_bounces_drop_on_headers:
x-spam-flag: "yes"
schleuder_bounces_notify_admins: "true"
schleuder_include_autocrypt_header: "true"
schleuder_include_list_headers: "true"
schleuder_include_openpgp_header: "true"
schleuder_openpgp_header_preference: signencrypt
Expand All @@ -122,6 +123,9 @@ schleuder_logfiles_to_keep: 2
# Available: en, de.
schleuder_language: en
schleuder_forward_all_incoming_to_admins: "false"
schleuder_deliver_selfsent: "true"
schleuder_set_reply_to_to_sender: "false"
schleuder_munge_from: "false"

### schleuder-web/database.yml
# schleuder-web uses it's own database to store user credentials
Expand All @@ -138,7 +142,7 @@ schleuder_web_mailer_from: [email protected]
schleuder_web_superadmins:
- "{{ schleuder_superadmin }}"

schleuder_web_version: "{{ 'debian/buster/3.4.0' if ansible_distribution_release == 'buster' else 'debian/bullseye/3.6.0' }}"
schleuder_web_version: "{{ 'debian/bullseye/3.6.0' if ansible_distribution_release == 'bullseye' else 'debian/bookworm/4.0.0' }}"

schleuder_schleuder_web_api_host: "{{ schleuder_api.host }}"
schleuder_schleuder_web_api_port: "{{ schleuder_api.port }}"
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ galaxy_info:
platforms:
- name: Debian
versions:
- bookworm
- bullseye
- buster
8 changes: 4 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ driver:
name: virtualbox

platforms:
- name: schleuder-bullseye64
box: debian/bullseye64
- name: schleuder-bookworm64
box: debian/bookworm64
memory: 1024
cpus: 2
instance_raw_config_args:
- "vm.network 'forwarded_port', guest: 3000, host: 3000"
- name: schleuder-buster64
box: debian/buster64
- name: schleuder-bullseye64
box: debian/bullseye64
memory: 1024
cpus: 2

Expand Down
9 changes: 0 additions & 9 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
---
- name: Install apt dependencies
ansible.builtin.apt:
name: "{{ item }}"
state: "present"
loop:
- python{{ '3' if ansible_python.version.major == 3 else '' }}-apt
when:
- ansible_distribution_release == "buster"

- name: Import schleuder tasks
ansible.builtin.import_tasks: schleuder.yml
tags:
Expand Down
2 changes: 1 addition & 1 deletion tasks/schleuder_gitlab_ticket_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

- name: Link gitlab-ticketing plugin as schleuder post_decryption filter
ansible.builtin.file:
src: "/var/lib/gems/{% if ansible_distribution_release == 'buster' %}2.5.0{% else %}2.7.0{% endif %}/gems/schleuder-gitlab-ticketing-1.0.0/lib/schleuder/filters/post_decryption/99_gitlab_ticketing.rb"
src: "/var/lib/gems/{% if ansible_distribution_release == 'bullseye' %}2.7.0{% else %}3.1.0{% endif %}/gems/schleuder-gitlab-ticketing-1.0.0/lib/schleuder/filters/post_decryption/99_gitlab_ticketing.rb"
dest: /usr/local/lib/schleuder/filters/post_decryption/99_gitlab_ticketing.rb
state: link

Expand Down
38 changes: 13 additions & 25 deletions tasks/schleuder_web.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
---
- name: Install schleuder-web build dependencies on buster
ansible.builtin.apt:
name: "{{ item }}"
state: "present"
loop:
- zlibc
when:
- ansible_distribution_release == "buster"

- name: Install schleuder-web build dependencies
ansible.builtin.apt:
name: "{{ item }}"
Expand All @@ -26,6 +17,12 @@
- make
- libsqlite3-dev

- name: Install schleuder-web build dependency nodejs on Debian bookworm
ansible.builtin.apt:
name: nodejs
state: "present"
when: ansible_distribution_major_version|int >= 12

- name: Ensure /var/www is present
ansible.builtin.file:
path: /var/www
Expand Down Expand Up @@ -112,27 +109,15 @@
- schleuder-web.yml

- name: Install bundler (when repo changed)
ansible.builtin.command: "gem install bundler -v 2.3.26"
changed_when: false
check_mode: no
vars:
ansible_ssh_pipelining: True
when: __schleuder_repo_clone.changed # noqa: no-handler

- name: Set bundle config option to install without develop and test (repo changed)
ansible.builtin.command: "/usr/local/bin/bundle config set --local without 'development test'"
ansible.builtin.command: "gem install bundler -v 2.4.18"
changed_when: false
check_mode: no
args:
chdir: "{{ schleuder_schleuder_web_path }}"
become: true
become_user: "{{ schleuder_schleuder_web_user }}"
vars:
ansible_ssh_pipelining: True
when: __schleuder_repo_clone.changed # noqa: no-handler

- name: Set bundle config option for path (when repo changed)
ansible.builtin.command: "/usr/local/bin/bundle config set --local path {{ schleuder_schleuder_web_home }}/.gem"
- name: Set bundle global config options
ansible.builtin.command: "/usr/local/bin/bundle config set --global {{ item }}"
changed_when: false
check_mode: no
args:
Expand All @@ -142,9 +127,12 @@
vars:
ansible_ssh_pipelining: True
when: __schleuder_repo_clone.changed # noqa: no-handler
with_items:
- "path {{ schleuder_schleuder_web_home }}/.gem"
- "without 'development test'"

- name: Install bundle (when repo changed)
ansible.builtin.command: "/usr/local/bin/bundle install --jobs {{ ansible_processor_cores }}"
ansible.builtin.command: "/usr/local/bin/bundle install"
changed_when: false
check_mode: no
args:
Expand Down
26 changes: 26 additions & 0 deletions templates/schleuder/list-defaults.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ bounces_drop_on_headers:
# Send a notice to the list-admins whenever an email is bounced or dropped?
bounces_notify_admins: {{ schleuder_bounces_notify_admins }}

# Include Autocrypt header into emails?
include_autocrypt_header: {{ schleuder_include_autocrypt_header }}

# Include RFC-compliant List-* Headers into emails?
include_list_headers: {{ schleuder_include_list_headers}}

Expand Down Expand Up @@ -124,3 +127,26 @@ language: {{ schleuder_language }}
# Forward a raw copy of all incoming emails to the list-admins?
# Mainly useful for debugging.
forward_all_incoming_to_admins: {{ schleuder_forward_all_incoming_to_admins }}

# Should e-mails be delivered to the original subscribed sender?
# Disabling this only works for signed e-mails; any e-mail that is unsigned
# sent to the list is treated as coming from an unknown source
deliver_selfsent: {{ schleuder_deliver_selfsent }}

# Set reply-to header to original sender's reply-to?
# Enabling this will set the reply-to-header of emails sent by schleuder
# to the original sender's reply-to-header. If the original sender
# did not supply a reply-to-header, the original from-header will be used.
# This option can enabled for improved usability since this affect
# mail client's reply-to button to reply to the original sender instead of
# the whole list.
set_reply_to_to_sender: {{ schleuder_set_reply_to_to_sender }}

# Munge from-header?
# Enabling this option will add the original sender to the from-header.
# To avoid DMARC issues, we still use the list's address as from-address.
# However the sender's address will be included as displayed name.
# For example: "[email protected] via [email protected]" <list@list.org>
# This option can enabled for improved usability since this affect
# mail client's displayed name.
munge_from: {{ schleuder_munge_from }}

0 comments on commit 4e49d67

Please sign in to comment.