From e1510bc1b66a8475d92eed34d957f1c542f35e2c Mon Sep 17 00:00:00 2001 From: gardar Date: Thu, 31 Oct 2024 16:10:12 +0000 Subject: [PATCH 1/2] fix: use elevated permissions for removing scrapes fixes #445 Signed-off-by: gardar --- roles/prometheus/tasks/configure.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/prometheus/tasks/configure.yml b/roles/prometheus/tasks/configure.yml index a2f949df..a2bc8bf1 100644 --- a/roles/prometheus/tasks/configure.yml +++ b/roles/prometheus/tasks/configure.yml @@ -176,3 +176,4 @@ ansible.builtin.file: path: "{{ prometheus_config_dir }}/scrapes" state: absent + become: true From cf1f68c6ba696be9f30a0058d70e70aa9c4eec3c Mon Sep 17 00:00:00 2001 From: gardar Date: Thu, 31 Oct 2024 16:11:14 +0000 Subject: [PATCH 2/2] fix: properly tag task Signed-off-by: gardar --- roles/prometheus/tasks/configure.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/prometheus/tasks/configure.yml b/roles/prometheus/tasks/configure.yml index a2bc8bf1..ae82cb17 100644 --- a/roles/prometheus/tasks/configure.yml +++ b/roles/prometheus/tasks/configure.yml @@ -177,3 +177,7 @@ path: "{{ prometheus_config_dir }}/scrapes" state: absent become: true + tags: + - prometheus + - configure + - prometheus_configure