From 52a68730e322b7749925b7d13273d070c9073b2b Mon Sep 17 00:00:00 2001 From: krumel Date: Sat, 26 Feb 2022 22:45:19 +0100 Subject: [PATCH] cupsd config for srv-print --- inventory.yml | 4 ++-- playbooks/srv-print.yml | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) 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