Deploy Cat-Printer as a Podman Quadlet container.
Cat Printer is a web app daemon that allows communitcation with thermal printers
via bluetooth. The container must have access to the bluetooth device, which by
default will be /dev/usb/hiddev0
. It's possible to adjust the device by
changing the variable cat_printer_quadlet_devices
. To figure out what is
your bluetooth device use the command lsusb |grep -i bluetooth|awk -F':' '{print $1}'|awk '{print "/dev/bus/usb/" $2 "/" $4}'
.
This quadlet, by default will run as rootfull.
podman
- version4.7.2+
cat_printer_quadlet
: (dict
) - Define the Container image and tagcat_printer_environment
: (dict
) - Define the environment variablescat_printer_volumes
: (list
) - A list of paths to be mountedcat_printer_quadlet_ports
: (list
) - A list of ports to be exposedcat_printer_quadlet_devices
: (list
) - A list of devices to bind in the container. (default:/dev/usb/hiddev0
will be mounted)cat_printer_autodetect_bluetooth
: (bool
) - If enabled, tries to autodetect the bluetooth devicecat_printer_dependecies
: (list
) - List of packages to be installed as dependencies
None
- Deploy using default settings:
---
- name: Deploy Cat Printer Quadlet
hosts: all
gather_facts: false
cat_printer_quadlet_devices:
- name: usb
path: /dev/usb/hiddev1
enable: true
roles:
- role: cat_printer
- Autodetect bluetooth:
---
- name: Deploy Cat Printer Quadlet
hosts: all
gather_facts: false
cat_printer_autodetect_bluetooth: true
roles:
- role: cat_printer
This role was developed using ansible molecule. The use of molecule is optional but recommended.
- Testing:
Unit tests for checking code regression are available in thetests
directory. use theverify
ortest
commands, e.g:
molecule test
while developing use verify
instead:
molecule create
molecule verify
@mrbrandao - Igor Brandão