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"