From 95ef8d2f661d48e23087e6560a6f1c74769f90c5 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sat, 10 Aug 2024 02:07:49 +0200 Subject: [PATCH] Update cups --- roles/cups-server/files/cupsd.conf | 8 ++++---- roles/cups-server/tasks/config.yml | 12 ++++++++++++ roles/cups-server/tasks/main.yml | 2 ++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 roles/cups-server/tasks/config.yml diff --git a/roles/cups-server/files/cupsd.conf b/roles/cups-server/files/cupsd.conf index 085705c..3e1b52d 100644 --- a/roles/cups-server/files/cupsd.conf +++ b/roles/cups-server/files/cupsd.conf @@ -14,8 +14,8 @@ MaxLogSize 0 # Default error policy for printers ErrorPolicy retry-job -# Only listen for connections from the local machine. -Listen 0.0.0.0:631 +# Allow remote access +Port 631 Listen /run/cups/cups.sock # Show shared printers on the local network. @@ -33,9 +33,9 @@ IdleExitTimeout 60 # Restrict access to the server... + # Allow remote access... Order allow,deny - Allow localhost - Allow 192.168.50.* + Allow all # Restrict access to the admin pages... diff --git a/roles/cups-server/tasks/config.yml b/roles/cups-server/tasks/config.yml new file mode 100644 index 0000000..2476156 --- /dev/null +++ b/roles/cups-server/tasks/config.yml @@ -0,0 +1,12 @@ +- name: copy mysql backup + become: yes + copy: + src: "cupsd.conf" + dest: "/etc/cups/cupsd.conf" + owner: root + mode: '0600' + +- name: restart cups + systemd: + name: cups + state: restarted diff --git a/roles/cups-server/tasks/main.yml b/roles/cups-server/tasks/main.yml index 52b260f..c45e500 100644 --- a/roles/cups-server/tasks/main.yml +++ b/roles/cups-server/tasks/main.yml @@ -1,2 +1,4 @@ --- - import_tasks: install.yml + +- import_tasks: config.yml