ansible-legacy/roles/bme280sensor/tasks/main.yml

31 lines
527 B
YAML

---
- name: install packages
apt:
state: latest
pkg:
- python-smbus
- i2c-tools
install_recommends: no
force_apt_get: yes
become: yes
- name: copy config files, scripts and services
copy:
src: "{{ item }}"
dest: "/{{ item }}"
force: yes
mode: preserve
become: yes
with_items:
- etc/modules-load.d/
- usr/local/bin/
- etc/zabbix/zabbix_agentd.conf.d/
- name: Add user zabbix to i2c group
user:
name: zabbix
groups: i2c
append: yes
become: yes