From f3ffdfc1337c045b0d030b329a36e1f16af38979 Mon Sep 17 00:00:00 2001 From: Jannik Beyerstedt Date: Sun, 6 Nov 2022 20:37:54 +0100 Subject: [PATCH] cronmails: Add option to skip Exim4 installation --- README.md | 3 +++ defaults/main.yml | 1 + tasks/cronmails.yml | 1 + 3 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 104df96..f5aa0a5 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ Mandatory variable: - `cron_email`: Sender email address used by cron - `exim_etc_mailname`: Exim4 /etc/mailname (default: inventory_hostname) +Optional settings: +- `exim_skip_install`: Skip installing Exim4 as MTA (default `false`) + ### Docker Optional variable: - none diff --git a/defaults/main.yml b/defaults/main.yml index b9d8ee2..dd8bbc9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,3 +11,4 @@ telegraf_unifi_file: "telegraf-UniFi.conf.j2" telegraf_airmax_file: "telegraf-AirMAX.conf.j2" exim_etc_mailname: "{{ inventory_hostname }}" +exim_skip_install: false diff --git a/tasks/cronmails.yml b/tasks/cronmails.yml index 4dea06e..8fe3760 100644 --- a/tasks/cronmails.yml +++ b/tasks/cronmails.yml @@ -3,6 +3,7 @@ # Install and configure exim - name: cronmails - Install exim4 + when: not exim_skip_install ansible.builtin.include_tasks: "{{ item }}" with_first_found: - "cronmails-{{ ansible_distribution }}.{{ ansible_distribution_release }}.yml"