From 02ad9e471d5a2e972fda6c17156f63c3b7361777 Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Thu, 17 Oct 2024 16:17:39 +0200 Subject: [PATCH] refactor(alertmanager): move config to own defaults file --- roles/alertmanager/defaults/main/config.yml | 8 ++++++++ roles/alertmanager/defaults/main/main.yml | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 roles/alertmanager/defaults/main/config.yml diff --git a/roles/alertmanager/defaults/main/config.yml b/roles/alertmanager/defaults/main/config.yml new file mode 100644 index 0000000..6d8ea8b --- /dev/null +++ b/roles/alertmanager/defaults/main/config.yml @@ -0,0 +1,8 @@ +--- +alertmanager_config_global: {} +alertmanager_config_route: {} +alertmanager_config_receivers: [] +alertmanager_config: + global: "{{ alertmanager_config_global }}" + route: "{{ alertmanager_config_route }}" + receivers: "{{ alertmanager_config_receivers }}" diff --git a/roles/alertmanager/defaults/main/main.yml b/roles/alertmanager/defaults/main/main.yml index 043cd28..9666bea 100644 --- a/roles/alertmanager/defaults/main/main.yml +++ b/roles/alertmanager/defaults/main/main.yml @@ -8,8 +8,3 @@ alertmanager_config_path: "{{ alertmanager_base_path }}/config" alertmanager_config_file: "{{ alertmanager_config_path }}/alertmanager.yml" alertmanager_data_path: "{{ alertmanager_base_path }}/data" - -alertmanager_config: - global: {} - route: {} - receivers: []