From db0db4ddb70bee269cb83d38db329cc2b5c2ace4 Mon Sep 17 00:00:00 2001 From: Jannik Beyerstedt Date: Sat, 30 May 2020 21:36:27 +0200 Subject: [PATCH] [FIX] ansible_lsb is empty on some systems --- templates/telegraf.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/telegraf.conf.j2 b/templates/telegraf.conf.j2 index fd15136..225462e 100644 --- a/templates/telegraf.conf.j2 +++ b/templates/telegraf.conf.j2 @@ -75,7 +75,7 @@ # ## If true, a field name like 'temp1_input' will be changed to 'temp_input'. # # remove_numbers = true -{% if ansible_lsb.id == "Raspbian" %} +{% if ansible_lsb.id is defined and ansible_lsb.id == "Raspbian" %} # On Raspbian, get CPU temperature (in millicelsius) [[inputs.exec]] commands = ["cat /sys/class/thermal/thermal_zone0/temp"]