Added service to automatically trigger udev rules after systemstart
This commit is contained in:
parent
3ba7a8acd1
commit
4c444c9642
28
playbooks/setup-google-coral.yml
Normal file
28
playbooks/setup-google-coral.yml
Normal file
@ -0,0 +1,28 @@
|
||||
- hosts: "leh01"
|
||||
become: true
|
||||
vars:
|
||||
tasks:
|
||||
# UDEV rules to allow access to Coral USB from LXC als Service einrichten
|
||||
- name: "Systemd service for UDEV rules to allow access to Coral USB from LXC -> Create configuration"
|
||||
tags: always
|
||||
template:
|
||||
src: "../templates/coral-usb/coralusb-udev-rule.service.j2"
|
||||
dest: /etc/systemd/system/coralusb-udev-rule.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Systemd Service for UDEV rules -> init (coralusb-udev-rule.service)
|
||||
tags: always
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: restarted
|
||||
name: coralusb-udev-rule
|
||||
|
||||
- name: Systemd service for UDEV rules -> restart
|
||||
tags: always
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
state: restarted
|
||||
name: coralusb-udev-rule
|
||||
11
templates/coral-usb/coralusb-udev-rule.service.j2
Normal file
11
templates/coral-usb/coralusb-udev-rule.service.j2
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Systemd service for UDEV rules required that lxc can access Coral USB
|
||||
#Wants=network.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=udevadm control --reload-rules
|
||||
ExecStart=udevadm trigger
|
||||
|
||||
[Install]
|
||||
#WantedBy=multi-user.target
|
||||
WantedBy=basic.target
|
||||
Loading…
Reference in New Issue
Block a user