From 92eba54c6f6668566ba7576468498cd191427adb Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Wed, 5 Jun 2024 12:11:49 +0200 Subject: [PATCH] add mailcatcher version support --- roles/redmine/defaults/main.yml | 4 ++++ roles/redmine/tasks/instance_update.yml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/redmine/defaults/main.yml b/roles/redmine/defaults/main.yml index d775797..98fc1fc 100644 --- a/roles/redmine/defaults/main.yml +++ b/roles/redmine/defaults/main.yml @@ -64,6 +64,10 @@ redmine_with_agile: false account_migrate_to_new_home: true +# use static version, if defined - default: latest (if not defined) +# https://github.com/sj26/mailcatcher +# redmine_mailcatcher_version: 'v0.9.1.beta2' + redmine_mailcatcher_ip: '' redmine_mailcatcher_smtp_port: 1025 redmine_mailcatcher_http_port: 1080 diff --git a/roles/redmine/tasks/instance_update.yml b/roles/redmine/tasks/instance_update.yml index 8498853..4812b33 100644 --- a/roles/redmine/tasks/instance_update.yml +++ b/roles/redmine/tasks/instance_update.yml @@ -57,7 +57,8 @@ - name: Install latest mailcatcher (cannot use Gemfile) - {{ instance_name }} community.general.gem: name: mailcatcher - state: latest + version: '{{ redmine_mailcatcher_version | default(omit) }}' + state: "{{ 'present' if redmine_mailcatcher_version is defined else 'latest' }}" when: - instance.with_mailcatcher is defined - instance.with_mailcatcher