[FIX] ansible_lsb is empty on some systems
This commit is contained in:
parent
06cd3d3076
commit
db0db4ddb7
|
@ -75,7 +75,7 @@
|
||||||
# ## If true, a field name like 'temp1_input' will be changed to 'temp_input'.
|
# ## If true, a field name like 'temp1_input' will be changed to 'temp_input'.
|
||||||
# # remove_numbers = true
|
# # 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)
|
# On Raspbian, get CPU temperature (in millicelsius)
|
||||||
[[inputs.exec]]
|
[[inputs.exec]]
|
||||||
commands = ["cat /sys/class/thermal/thermal_zone0/temp"]
|
commands = ["cat /sys/class/thermal/thermal_zone0/temp"]
|
||||||
|
|
Loading…
Reference in a new issue