--- - name: install lua and libs needed by sensors script apt: name: - lua5.1 - lua-cjson - lua-posix state: present - name: create lua 5.1 module path in /usr/local file: path: /usr/local/share/lua/5.1 state: directory - name: install sensors module copy: src: "{{ global_files_dir }}/common/openwrt/sensors.module_lua" dest: /usr/local/share/lua/5.1/sensors.lua - name: create configure directory file: path: /etc/prometheus/exporter/node state: directory - name: generate senors config copy: content: "{{ prometheus_exporter_node_textfile_collector__sensors | to_nice_json }}\n" dest: /etc/prometheus/exporter/node/sensors.json notify: remove sensors state file - name: install the sensors textfile collector script include_tasks: textfile_collector_generic.yml