Skip to content

Commit

Permalink
Add PlatformIO's udev rules
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Servin <gary@servin.dev>
  • Loading branch information
garyservin committed Nov 26, 2024
1 parent 7c0e5fc commit a881289
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion roles/andino/tasks/00-andino_hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
become: true
register: usb_serial_rules

- name: "Reload udev rules"
- name: "Reload udev rules for serial"
shell: udevadm control --reload-rules && udevadm trigger
become: true
when: usb_serial_rules.changed # noqa: no-handler
Expand Down Expand Up @@ -83,3 +83,17 @@
lineinfile:
path: "/home/{{ ansible_user }}/.bashrc"
line: "export PATH=$PATH:/home/{{ ansible_user }}/.platformio/penv/bin"

- name: Download udev rules for PlatformIO
get_url:
url: https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/system/99-platformio-udev.rules
dest: /etc/udev/rules.d/99-platformio-udev.rules
mode: u=rw,g=r,o=r
become: true
register: platformio_rules

- name: "Reload udev rules for platformio"
shell: udevadm control --reload-rules && udevadm trigger
become: true
when: platformio_rules.changed # noqa: no-handler
changed_when: true

0 comments on commit a881289

Please sign in to comment.