# {{ ansible_managed }} # # CUPS on the label print proxy. The Pi does all the rendering, so macOS, # Windows and Linux clients add the queue driverless over IPP Everywhere / # AirPrint and never install a Phomemo driver. # # Reachable from the LAN and from the rescue access point only. Everything else # is refused here and dropped again at nftables. LogLevel warn PageLogFormat MaxLogSize 1m # A label job is worth retrying: the printer is often powered off or out of # stock when the job is submitted, and the default is to bin the job outright. ErrorPolicy retry-job # Only trusted, local networks reach this port -- see the Location blocks below # and roles/labelprint/templates/nftables.conf.j2. Listening on all interfaces # rather than a fixed address so the queue is still reachable at # {{ labelprint_ap_addr }} when the Pi has fallen back to its rescue AP. Listen 631 Listen /run/cups/cups.sock # Advertise over Bonjour/mDNS so clients discover the queue by themselves. Browsing On BrowseLocalProtocols dnssd # Dropping the _cups subtype is what makes macOS and iOS offer a driverless # "AirPrint" add instead of guessing at a Generic PostScript driver. BrowseDNSSDSubTypes _print,_universal DefaultAuthType Basic WebInterface Yes Order allow,deny Allow from {{ labelprint_lan_cidr }} Allow from {{ labelprint_ap_cidr }} Allow from localhost AuthType Default Require user @SYSTEM Order allow,deny Allow from {{ labelprint_lan_cidr }} Allow from {{ labelprint_ap_cidr }} AuthType Default Require user @SYSTEM Order allow,deny Allow from {{ labelprint_lan_cidr }} Allow from {{ labelprint_ap_cidr }} AuthType Default Require user @SYSTEM Order allow,deny Allow from {{ labelprint_lan_cidr }} Allow from {{ labelprint_ap_cidr }} JobPrivateAccess default JobPrivateValues default SubscriptionPrivateAccess default SubscriptionPrivateValues default # Anyone on the LAN may print and manage their own jobs -- this is a label # printer in a workshop, not a shared office device with quotas. Order deny,allow Order deny,allow # Changing the printer itself needs a local admin. AuthType Default Require user @SYSTEM Order deny,allow AuthType Default Require user @SYSTEM Order deny,allow Order deny,allow