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