32 lines
721 B
YAML
32 lines
721 B
YAML
- name: Install linux-tools-generic
|
|
apt:
|
|
update_cache: true
|
|
name:
|
|
- linux-tools-generic
|
|
|
|
- name: Install usbip systemd unit
|
|
copy:
|
|
src: usbipd.service
|
|
dest: /etc/systemd/system/usbipd.service
|
|
mode: 0644
|
|
register: copy_usbipd_unit
|
|
|
|
- name: Install usbip-bind systemd unit
|
|
copy:
|
|
src: usbip-bind@.service
|
|
dest: /etc/systemd/system/usbip-bind@.service
|
|
mode: 0644
|
|
register: copy_usbip_bind_unit
|
|
|
|
- name: Reload systemd
|
|
systemd:
|
|
daemon_reload: true
|
|
when: copy_usbipd_unit.changed or copy_usbip_bind_unit.changed
|
|
|
|
- name: Enable usbip units
|
|
with_items: "{{ exposed_usb_devices }}"
|
|
systemd:
|
|
name: "usbip-bind@{{ item }}.service"
|
|
state: started
|
|
enabled: true
|