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"]