2019-02-10 15:33:10 +00:00
|
|
|
---
|
|
|
|
- block:
|
2019-08-13 20:05:48 +00:00
|
|
|
- name: Install cups
|
2021-06-05 13:30:46 +00:00
|
|
|
package:
|
2019-08-13 20:27:17 +00:00
|
|
|
name: "{{ cups_packages | default(__cups_packages) }}"
|
2019-02-10 15:33:10 +00:00
|
|
|
state: present
|
2019-02-12 22:31:40 +00:00
|
|
|
notify: __cupsd_restart
|
2019-02-10 17:21:25 +00:00
|
|
|
|
2019-08-13 20:05:48 +00:00
|
|
|
- name: Install extra packages
|
2021-06-05 13:30:46 +00:00
|
|
|
package:
|
2019-08-13 20:05:48 +00:00
|
|
|
name: "{{ cups_packages_extra }}"
|
2019-02-10 22:55:24 +00:00
|
|
|
state: present
|
2019-02-12 22:31:40 +00:00
|
|
|
notify: __cupsd_restart
|
2019-02-10 22:55:24 +00:00
|
|
|
|
2019-02-10 17:21:25 +00:00
|
|
|
- name: Deploy global config files
|
|
|
|
template:
|
2019-02-21 20:27:21 +00:00
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "/{{ item }}"
|
2019-02-10 17:21:25 +00:00
|
|
|
mode: 0640
|
2019-02-21 20:27:21 +00:00
|
|
|
loop:
|
|
|
|
- etc/cups/cupsd.conf
|
|
|
|
- etc/cups/cups-files.conf
|
2019-02-10 17:21:25 +00:00
|
|
|
notify: __cupsd_restart
|
2019-02-10 17:33:57 +00:00
|
|
|
|
2019-02-18 21:17:00 +00:00
|
|
|
- name: Update pamd rule's control in /etc/pam.d/cups
|
|
|
|
pamd:
|
|
|
|
name: cups
|
|
|
|
type: "{{ item.type }}"
|
|
|
|
control: "{{ item.control }}"
|
|
|
|
module_path: "{{ item.module }}"
|
|
|
|
module_arguments: "{{ item.arguments | default(omit) }}"
|
|
|
|
new_module_path: "{{ item.new_module }}"
|
|
|
|
loop: "{{ __pam_config }}"
|
2019-11-08 11:51:20 +00:00
|
|
|
|
|
|
|
- name: Replace default systemd unit
|
|
|
|
template:
|
2019-11-08 12:13:21 +00:00
|
|
|
src: "etc/systemd/system/org.cups.cupsd.service.j2"
|
|
|
|
dest: "/etc/systemd/system/org.cups.cupsd.service"
|
2021-02-06 15:01:32 +00:00
|
|
|
mode: 0640
|
2019-11-08 11:51:20 +00:00
|
|
|
notify: __cupsd_restart
|
2019-02-10 15:33:10 +00:00
|
|
|
become: True
|
|
|
|
become_user: root
|