2019-02-10 16:33:10 +01:00
|
|
|
---
|
|
|
|
- block:
|
2019-08-13 22:05:48 +02:00
|
|
|
- name: Install cups
|
2019-02-10 16:33:10 +01:00
|
|
|
yum:
|
2019-08-13 22:27:17 +02:00
|
|
|
name: "{{ cups_packages | default(__cups_packages) }}"
|
2019-02-10 16:33:10 +01:00
|
|
|
state: present
|
2019-02-12 23:31:40 +01:00
|
|
|
notify: __cupsd_restart
|
2019-02-10 18:21:25 +01:00
|
|
|
|
2019-08-13 22:05:48 +02:00
|
|
|
- name: Install extra packages
|
2019-02-10 23:55:24 +01:00
|
|
|
yum:
|
2019-08-13 22:05:48 +02:00
|
|
|
name: "{{ cups_packages_extra }}"
|
2019-02-10 23:55:24 +01:00
|
|
|
state: present
|
2019-02-12 23:31:40 +01:00
|
|
|
notify: __cupsd_restart
|
2019-02-10 23:55:24 +01:00
|
|
|
|
2019-02-10 18:21:25 +01:00
|
|
|
- name: Deploy global config files
|
|
|
|
template:
|
2019-02-21 21:27:21 +01:00
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "/{{ item }}"
|
2019-02-10 18:21:25 +01:00
|
|
|
mode: 0640
|
2019-02-21 21:27:21 +01:00
|
|
|
loop:
|
|
|
|
- etc/cups/cupsd.conf
|
|
|
|
- etc/cups/cups-files.conf
|
2019-02-10 18:21:25 +01:00
|
|
|
notify: __cupsd_restart
|
2019-02-10 18:33:57 +01:00
|
|
|
|
2019-02-18 22:17:00 +01: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-02-10 16:33:10 +01:00
|
|
|
become: True
|
|
|
|
become_user: root
|