[FIX] ansible_lsb is empty on some systems

This commit is contained in:
Jannik Beyerstedt 2020-05-30 21:36:27 +02:00
parent 06cd3d3076
commit db0db4ddb7

View file

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