xoxys.cups/tasks/install.yml
Robert Kaussow 1e066fe8d9
All checks were successful
continuous-integration/drone/push Build is passing
add custom systemd unit
2019-11-08 12:52:01 +01:00

42 lines
1.1 KiB
YAML

---
- block:
- name: Install cups
yum:
name: "{{ cups_packages | default(__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: Replace default systemd unit
template:
src: "etc/systemd/system/org.cups.cupsd.service.service.j2"
dest: "/etc/systemd/system/org.cups.cupsd.service.service"
notify: __cupsd_restart
become: True
become_user: root