2019-02-10 15:33:10 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Copy cups rpms to destination host
|
|
|
|
copy:
|
2019-02-10 16:23:13 +00:00
|
|
|
src: "files/{{ item | basename }}"
|
|
|
|
dest: "{{ item }}"
|
2019-02-10 15:33:10 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0640
|
|
|
|
loop: "{{ __cups_rpm_files }}"
|
|
|
|
|
|
|
|
- name: Install cups rpms
|
|
|
|
yum:
|
2019-02-10 16:25:00 +00:00
|
|
|
name: "{{ __cups_rpm_files }}"
|
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-02-10 22:55:24 +00:00
|
|
|
- name: Install custom driver packages
|
|
|
|
yum:
|
|
|
|
name: "{{ cups_custom_driver_packages }}"
|
|
|
|
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:
|
|
|
|
src: "etc/cups/cupsd.conf.j2"
|
|
|
|
dest: "/etc/cups/cupsd.conf"
|
|
|
|
mode: 0640
|
|
|
|
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-02-10 17:33:57 +00:00
|
|
|
- name: Open ports in iptables
|
|
|
|
iptables_raw:
|
2019-02-12 23:10:26 +00:00
|
|
|
name: "{{ item.name }}"
|
|
|
|
rules: "{{ item.rules }}"
|
|
|
|
state: "{{ item.state }}"
|
|
|
|
weight: "{{ item.weight | default(omit) }}"
|
|
|
|
table: "{{ item.table | default(omit) }}"
|
|
|
|
loop: "{{ cups_open_ports }}"
|
|
|
|
loop_control:
|
|
|
|
label: "{{ item.name }}"
|
2019-02-10 17:33:57 +00:00
|
|
|
when: cups_iptables_enabled
|
2019-02-10 15:33:10 +00:00
|
|
|
become: True
|
|
|
|
become_user: root
|