From d1c80cf452600c364a6a0b6494ffcde9dcfbe590 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Thu, 14 Apr 2022 13:33:34 +0000 Subject: [PATCH] cups_server: Convert modules to use FQCN --- roles/cups_server/handlers/main.yml | 2 +- roles/cups_server/tasks/main.yml | 36 ++++++++++++++--------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/roles/cups_server/handlers/main.yml b/roles/cups_server/handlers/main.yml index 7923ad8..f8aeecf 100644 --- a/roles/cups_server/handlers/main.yml +++ b/roles/cups_server/handlers/main.yml @@ -1,6 +1,6 @@ --- - name: restart cups - service: + ansible.builtin.service: name: cups state: restarted diff --git a/roles/cups_server/tasks/main.yml b/roles/cups_server/tasks/main.yml index 7b75f4c..943ee04 100644 --- a/roles/cups_server/tasks/main.yml +++ b/roles/cups_server/tasks/main.yml @@ -1,11 +1,11 @@ --- - name: install cups packages - package: + ansible.builtin.package: name: cups state: installed - name: create cups systemd override directory - file: + ansible.builtin.file: path: /etc/systemd/system/cups.service.d state: directory mode: 0755 @@ -13,7 +13,7 @@ group: "{{ ansible_wheel }}" - name: configure cups keytab location - copy: + ansible.builtin.copy: dest: /etc/systemd/system/cups.service.d/keytab.conf content: "[Service]\nEnvironment=KRB5_KTNAME=FILE:/etc/cups/cups.keytab\n" mode: 0644 @@ -21,49 +21,49 @@ group: "{{ ansible_wheel }}" - name: enable gssapi authentication from cups - lineinfile: + ansible.builtin.lineinfile: path: /etc/cups/cupsd.conf regexp: "^DefaultAuthType .*" line: "DefaultAuthType Negotiate" notify: restart cups - name: disable cups plain text port - lineinfile: + ansible.builtin.lineinfile: path: /etc/cups/cupsd.conf regexp: "^#?Listen (.*:)?631" line: "#Listen 631" notify: restart cups - name: set ssl listen port - lineinfile: + ansible.builtin.lineinfile: path: /etc/cups/cupsd.conf line: "SSLListen 631" insertafter: "Listen /var/run/cups/cups.sock" notify: restart cups - name: require tls 1.3 - lineinfile: + ansible.builtin.lineinfile: path: /etc/cups/cupsd.conf line: "SSLOptions MinTLS1.3" insertafter: "SSLListen 631" notify: restart cups - name: write all requests to cups access log - lineinfile: + ansible.builtin.lineinfile: path: /etc/cups/cupsd.conf line: "AccessLogLevel all" insertafter: "LogLevel warn" notify: restart cups - name: disable printer advertisements - lineinfile: + ansible.builtin.lineinfile: path: /etc/cups/cupsd.conf regexp: "^BrowseLocalProtocols .*" line: "BrowseLocalProtocols none" notify: restart cups - name: link private key - file: + ansible.builtin.file: dest: "/etc/cups/ssl/{{ inventory_hostname }}.key" src: "{{ tls_private }}/{{ inventory_hostname }}.key" state: link @@ -74,7 +74,7 @@ notify: restart cups - name: link certificate - file: + ansible.builtin.file: dest: "/etc/cups/ssl/{{ inventory_hostname }}.crt" src: "{{ tls_certs }}/{{ inventory_hostname }}.crt" state: link @@ -85,14 +85,14 @@ notify: restart cups - name: disable printer advertising - lineinfile: + ansible.builtin.lineinfile: path: /etc/cups/cupsd.conf regexp: "^Browsing .*" line: "Browsing No" notify: restart cups - name: disable unauthenticated access from cups - blockinfile: + ansible.builtin.blockinfile: path: /etc/cups/cupsd.conf insertafter: "^" block: | @@ -101,14 +101,14 @@ notify: restart cups - name: configure cups admin group - lineinfile: + ansible.builtin.lineinfile: path: /etc/cups/cups-files.conf regexp: "^SystemGroup .*" line: "SystemGroup root sysadm" notify: restart cups - name: add static files to cups web interface - copy: + ansible.builtin.copy: dest: "/usr/share/cups/www/{{ item }}" src: "{{ item }}" mode: 0644 @@ -119,7 +119,7 @@ - local.css - name: create custom header for cups web interface - copy: + ansible.builtin.copy: dest: /usr/share/cups/templates/header.tmpl src: header.tmpl mode: 0644 @@ -127,13 +127,13 @@ group: "{{ ansible_wheel }}" - name: disable cups socket service - systemd: + ansible.builtin.systemd: name: cups.socket enabled: false state: stopped - name: enable cups service - service: + ansible.builtin.service: name: cups enabled: true state: started