add task to exclude serial devices from ModemManager
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
2132d119b1
commit
0bf158ef1f
@ -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
|
||||
|
@ -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"
|
||||
|
5
templates/etc/udev/rules.d/99-mm-disable.rules.j2
Normal file
5
templates/etc/udev/rules.d/99-mm-disable.rules.j2
Normal 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 %}
|
Loading…
Reference in New Issue
Block a user