// the find
geerlingguy/pi-webcam
Automation to configure a Raspberry Pi as a USB OTG webcam
An Ansible playbook that turns a Raspberry Pi (Zero, Zero W, or Pi 4) into a USB UVC webcam by configuring the kernel's USB gadget mode and building the uvc-gadget tool. It's for hobbyists who want a dedicated, low-cost webcam that plugs into any OS without host-side drivers — not for anyone needing a turnkey commercial product.
Wraps a previously manual, blog-post-based process (dd'ing config, editing boot files by hand) into a repeatable, version-controlled Ansible run, which is a real improvement over copy-pasting shell commands off a gist. CI runs ansible-lint and yamllint against the playbook, so at least the automation itself is checked on every push. Supports both on-device and remote (SSH-based) execution via separate inventory files, which is a sensible split for a Pi Zero that's slow to run Ansible locally.
The playbook modifies the boot partition destructively and explicitly warns it should only be run on a disposable microSD — there's no rollback path if something goes wrong mid-run. Hardware support is narrow: only Zero, Zero W, A/A+, and Pi 4 can act as USB devices at all, and the README documents an unresolved Pi 4 lockup bug worked around only by pinning to a 2020 Raspbian image. Resolution is hardcoded to 720p by the upstream uvc-gadget dependency, with 1080p support tracked in an open issue rather than shipped. No commits since mid-2023, so newer Raspberry Pi OS/kernel releases are untested against it, and the README itself flags that OS updates could silently break the setup.