From 644d86a99a995aa01827e3e2efe0e5f3a07fbf1b Mon Sep 17 00:00:00 2001 From: Jan Gosmann Date: Sat, 17 Feb 2024 13:29:52 +0100 Subject: [PATCH] Update Ansible role for new logging configuration --- roles/README.rst | 1 + roles/dmarc_metrics_exporter/defaults/main.yml | 2 ++ .../templates/dmarc-metrics-exporter.json.j2 | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/README.rst b/roles/README.rst index 858417a..abb5449 100644 --- a/roles/README.rst +++ b/roles/README.rst @@ -55,3 +55,4 @@ Available role variables * ``folder_error``: (string, default ``"Invalid"``): IMAP mailbox that emails are moved to that could not be processed. * ``poll_interval_seconds`` (number, default ``60``): How often to poll the IMAP server in seconds. * ``deduplication_max_seconds`` (number, default ``604800`` which is 7 days): How long individual report IDs will be remembered to avoid counting double delivered reports twice. +* ``logging_config`` (map, default ``{}``): Logging configuration, see main documentation for details. diff --git a/roles/dmarc_metrics_exporter/defaults/main.yml b/roles/dmarc_metrics_exporter/defaults/main.yml index 252b50a..ae12179 100644 --- a/roles/dmarc_metrics_exporter/defaults/main.yml +++ b/roles/dmarc_metrics_exporter/defaults/main.yml @@ -13,6 +13,8 @@ imap_verify_certificate: yes poll_interval_seconds: 60 deduplication_max_seconds: 604800 +logging_config: {} + folder_inbox: "INBOX" folder_done: "Archive" folder_error: "Invalid" diff --git a/roles/dmarc_metrics_exporter/templates/dmarc-metrics-exporter.json.j2 b/roles/dmarc_metrics_exporter/templates/dmarc-metrics-exporter.json.j2 index d479c35..81ab2bf 100644 --- a/roles/dmarc_metrics_exporter/templates/dmarc-metrics-exporter.json.j2 +++ b/roles/dmarc_metrics_exporter/templates/dmarc-metrics-exporter.json.j2 @@ -16,5 +16,6 @@ }, "storage_path": "/var/lib/dmarc-metrics-exporter", "poll_interval_seconds": {{ poll_interval_seconds }}, - "deduplication_max_seconds": {{ deduplication_max_seconds }} + "deduplication_max_seconds": {{ deduplication_max_seconds }}, + "logging": {{ logging_config | to_json }} }