- 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-rules.service.j2"
        dest: /etc/systemd/system/coralusb-udev-rules.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-rules

    - name: Systemd service for UDEV rules -> restart
      tags: always
      systemd:
        daemon_reload: yes
        state: restarted
        name: coralusb-udev-rules