diff --git a/playbooks/srv-print.yml b/playbooks/srv-print.yml index cef19e5..3e7933a 100644 --- a/playbooks/srv-print.yml +++ b/playbooks/srv-print.yml @@ -27,10 +27,20 @@ path: /etc/cups/cupsd.conf regexp: 'Listen localhost: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: '' + insertbefore: '' + block: | + Order allow,deny + Allow all + register: cupsd_mod2 - name: service: name: cups state: restarted - when: cupsd_replace.changed \ No newline at end of file + when: cupsd_mod1.changed | cupsd_mod2.changed \ No newline at end of file