srv-print cupsd webinterface

This commit is contained in:
krumel
2022-02-26 23:00:42 +01:00
parent 52a68730e3
commit e726a571dd

View File

@ -27,10 +27,20 @@
path: /etc/cups/cupsd.conf path: /etc/cups/cupsd.conf
regexp: 'Listen localhost:631' regexp: 'Listen localhost:631'
replace: 'Listen 0.0.0.0:631' replace: 'Listen 0.0.0.0:631'
register: cupsd_replace register: cupsd_mod1
- name: allow access to the webinterface
blockinfile:
path: /etc/cups/cupsd.conf
insertafter: '<Location /admin>'
insertbefore: '</Location>'
block: |
Order allow,deny
Allow all
register: cupsd_mod2
- name: - name:
service: service:
name: cups name: cups
state: restarted state: restarted
when: cupsd_replace.changed when: cupsd_mod1.changed | cupsd_mod2.changed