diff --git a/inventory.yml b/inventory.yml index 8016d0c..d9cdd8b 100644 --- a/inventory.yml +++ b/inventory.yml @@ -2,11 +2,11 @@ all: children: - single-hosts: + singlehosts: rpi: # Hosts without special groups -single-hosts: +singlehosts: hosts: srv-print: ansible_host: 192.168.2.95 diff --git a/playbooks/srv-print.yml b/playbooks/srv-print.yml index bb44608..cef19e5 100644 --- a/playbooks/srv-print.yml +++ b/playbooks/srv-print.yml @@ -20,4 +20,17 @@ - cups - printer-driver-splix state: present - update_cache: yes \ No newline at end of file + update_cache: yes + + - name: allow access to cups from network + replace: + path: /etc/cups/cupsd.conf + regexp: 'Listen localhost:631' + replace: 'Listen 0.0.0.0:631' + register: cupsd_replace + + - name: + service: + name: cups + state: restarted + when: cupsd_replace.changed \ No newline at end of file