add task to exclude serial devices from ModemManager
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Robert Kaussow 2019-05-04 17:47:38 +02:00
parent 2132d119b1
commit 0bf158ef1f
3 changed files with 18 additions and 0 deletions

View File

@ -38,6 +38,13 @@ homeassistant_open_ports:
# be careful! wrong config can make your system unusable!
# homeassistant_cmdline_content: "console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline rootwait"
# to prevent ModemManger from binding serial devices like CC2531
# devices can be skipped by an udev rule
homeassistant_exclude_modemmanager: False
homeassistant_serial_device:
- vendor_id: "0000"
product_id: "xxxx"
homeassistant_nginx_vhost_enabled: False
homeassistant_nginx_server: localhost
homeassistant_nginx_vhost_dir: /etc/nginx/sites-available

View File

@ -41,6 +41,12 @@
dest: /boot/cmdline.txt
when: homeassistant_cmdline_content is defined
- name: Exclude serial devices from ModemManager
template:
src: "etc/udev/rules.d/99-mm-disable.rules.j2"
dest: "/etc/udev/rules.d/99-mm-disable.rules"
when: homeassistant_exclude_modemmanager
- name: Copy systemd unit file
template:
src: "etc/systemd/system/homeassistant.service.j2"

View File

@ -0,0 +1,5 @@
#jinja2: lstrip_blocks: True
# {{ ansible_managed }}
{% for item in homeassistant_serial_device %}
ATTRS{idVendor}=="{{ item.vendor_id }}" ATTRS{idProduct}=="{{ item.product_id }}", ENV{ID_MM_DEVICE_IGNORE}="1"
{% endfor %}