diff --git a/ansible/plays/templates/99-usb-scanner.rules.j2 b/ansible/plays/templates/99-usb-scanner.rules.j2 new file mode 100644 index 0000000..bb85f3f --- /dev/null +++ b/ansible/plays/templates/99-usb-scanner.rules.j2 @@ -0,0 +1 @@ +SUBSYSTEM=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0159", ATTRS{serial}=="X35D008129", SYMLINK+="usb-scanner" diff --git a/ansible/plays/thonkpad.yaml b/ansible/plays/thonkpad.yaml index 071e8ce..2e21d9e 100644 --- a/ansible/plays/thonkpad.yaml +++ b/ansible/plays/thonkpad.yaml @@ -1,3 +1,20 @@ +- name: Deploy udev rule + hosts: thonkpad.ka.chaoswg.org + tasks: + - name: Deploy udev rule + ansible.builtin.template: + src: 99-usb-scanner.rules.j2 + dest: /etc/udev/rules.d/ + owner: root + group: root + mode: 0644 + notify: + - Reload udev rules + handlers: + - name: Reload udev rules + ansible.builtin.command: udevadm control --reload-rules && udevadm trigger + changed_when: false + - name: Setup Thonkpad hosts: thonkpad.ka.chaoswg.org vars: