xoxys.cups/tasks/install.yml
Robert Kaussow 564c20c754
All checks were successful
continuous-integration/drone/push Build is passing
fix default pam config
2019-02-18 22:17:00 +01:00

54 lines
1.4 KiB
YAML

---
- block:
- name: Copy cups rpms to destination host
copy:
src: "files/{{ item | basename }}"
dest: "{{ item }}"
owner: root
group: root
mode: 0640
loop: "{{ __cups_rpm_files }}"
- name: Install cups rpms
yum:
name: "{{ __cups_rpm_files }}"
state: present
notify: __cupsd_restart
- name: Install custom driver packages
yum:
name: "{{ cups_custom_driver_packages }}"
state: present
notify: __cupsd_restart
- name: Deploy global config files
template:
src: "etc/cups/cupsd.conf.j2"
dest: "/etc/cups/cupsd.conf"
mode: 0640
notify: __cupsd_restart
- 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 }}"
- name: Open ports in iptables
iptables_raw:
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 }}"
when: cups_iptables_enabled
become: True
become_user: root