xoxys.cups/tasks/install.yml
Robert Kaussow 7d59e38d63
Some checks failed
continuous-integration/drone/push Build is failing
refactoring
2019-08-13 22:05:48 +02:00

48 lines
1.3 KiB
YAML

---
- block:
- name: Install cups
yum:
name: "{{ cups_packages | deafult(__cups_packages) }}"
state: present
notify: __cupsd_restart
- name: Install extra packages
yum:
name: "{{ cups_packages_extra }}"
state: present
notify: __cupsd_restart
- name: Deploy global config files
template:
src: "{{ item }}.j2"
dest: "/{{ item }}"
mode: 0640
loop:
- etc/cups/cupsd.conf
- etc/cups/cups-files.conf
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