From ec00bf3d76eb13590bef3546ac67ee1ddb2f1177 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Tue, 30 Aug 2022 06:46:16 -0500 Subject: [PATCH] telegraf: don't start the service if the package is absent --- roles/telegraf/tasks/main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/telegraf/tasks/main.yaml b/roles/telegraf/tasks/main.yaml index f174e98..0c2fc2f 100644 --- a/roles/telegraf/tasks/main.yaml +++ b/roles/telegraf/tasks/main.yaml @@ -62,3 +62,4 @@ name: "{{ telegraf_service_name }}" state: "{{ telegraf_service_state }}" enabled: "{{ telegraf_service_enabled }}" + when: telegraf_package_state != "absent"