Fix implementing printing from virtual machines.
Already installed "IPP everywhere" printers have to be replaced by "driverless" printers. Fix Listen address in cupsd.conf because VMBridge IP is not yet avaible when cups is starting.
This commit is contained in:
parent
9bce299c55
commit
eab3b75bff
2 changed files with 24 additions and 3 deletions
|
@ -268,6 +268,27 @@
|
|||
chdir: /lmn/vm/
|
||||
when: not vm_usage_information.stat.exists
|
||||
|
||||
- name: Detect if IPP-Everywhere printers exist
|
||||
ansible.builtin.shell:
|
||||
cmd: grep "IPP Everywhere" /etc/cups/printers.conf
|
||||
register: ipp_everywhere
|
||||
failed_when: ipp_everywhere.rc >= 2
|
||||
changed_when: False
|
||||
|
||||
- name: Delete old IPP-Everywhere printers
|
||||
shell:
|
||||
cmd: |
|
||||
for p in $(lpstat -p | cut -d" " -f2); do
|
||||
lpadmin -x "$p"
|
||||
done
|
||||
when: not ipp_everywhere.rc
|
||||
|
||||
- name: Remove Listen on VMBridge
|
||||
lineinfile:
|
||||
dest: /etc/cups/cupsd.conf
|
||||
line: 'Listen 192.168.122.1:631'
|
||||
state: absent
|
||||
|
||||
## bookworm fixes/hacks:
|
||||
- name: Work around sddm hang on shutdown
|
||||
ansible.builtin.lineinfile:
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
line: '\1No'
|
||||
backrefs: yes
|
||||
|
||||
- name: Listen on VMBridge
|
||||
- name: Listen on all Interfaces
|
||||
lineinfile:
|
||||
dest: /etc/cups/cupsd.conf
|
||||
line: 'Listen 192.168.122.1:631'
|
||||
insertafter: 'Listen localhost:631'
|
||||
line: 'Listen *:631'
|
||||
regexp: '^Listen localhost'
|
||||
state: present
|
||||
|
||||
- name: Allow access from localhost and from VM
|
||||
|
|
Loading…
Add table
Reference in a new issue