tweaks/tasks/FreeBSD-printing.yml

73 lines
1.6 KiB
YAML

---
# https://www.freebsd.org/doc/en/articles/cups/printing-cups-configuring-printers.html
# https://www.bsdforen.de/threads/probleme-mit-cups.31238/
- name: install cups
package:
name:
- cups
- cups-filters # provides filtering and is needed
- cups-pdf # nice pdf export
- gutenprint # drivers
- hplip # drivers
- foomatic* #drivers
- min12xxw #driver for my rpinter
state: present
become: true
tags:
- installation
- name: devfs
lineinfile:
path: "/etc/rc.conf"
regexp: "^{{ item.name }}"
line: "{{ item.name }}={{ item.val }}"
become: true
loop: "{{ sysctl_setting }}"
vars:
sysctl_setting:
- name: lpd_enable
val: "YES"
- name: cupsd_enable
val: "YES"
- name: "devfs_system_ruleset"
val: "\"system\""
tags:
- configuration
- name: devfs for cups
lineinfile:
path: "/etc/devfs.conf"
line: "{{ line }}"
become: true
loop_control:
loop_var: line
loop:
- "[system=10]"
- "add path 'unlpt*' mode 0660 group cups"
- "add path 'ulpt*' mode 0660 group cups"
- "add path 'lpt*' mode 0660 group cups"
# add path 'usb/X.Y.Z' mode 0660 group cups
# https://www.freebsd.org/doc/en/articles/cups/printing-cups-configuring-server.html
- "add path 'usb/0.7.*' mode 0660 group cups"
tags:
- configuration
- name: "start lpd"
service:
name: "lpd"
state: started
become: true
tags:
- service
- configuration
- name: "start cupsd"
service:
name: "cupsd"
state: started
become: true
tags:
- service
- configuration