Targeting Debian 11.
Install and configure Motion security camera daemon. Motion will be installed from your system repositories.
The example playbook motion.yml
contains an example USB camera definition.
You can obtain usb-id's for your cameras from /dev/v4l/by-id/
.
Ansible playbooks are executed with ansible-playbook
ansible-playbook -i inventory.ini motion.yml
This role contains a "hard-coded" motion.conf
that is very specific to my use. It's rather likely that you want to customize things, such as the kind of cameras (Currently just USB) or the output format and framerate.