cups.yml 706 Bytes
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1 2 3
---
- name: install CUPS
  become: yes
julian.gethmann's avatar
julian.gethmann committed
4 5 6
  dnf:
    name: cups
    state: present
julian.gethmann's avatar
julian.gethmann committed
7 8 9 10
  when: ansible_distribution == 'Fedora'

- name: install CUPS
  become: yes
julian.gethmann's avatar
julian.gethmann committed
11 12 13
  apt:
    name: cups
    state: present
julian.gethmann's avatar
julian.gethmann committed
14 15 16 17
  when: ansible_distribution == 'Ubuntu'

- name: copy CUPS' configs
  become: yes
julian.gethmann's avatar
julian.gethmann committed
18 19
  copy:
    src: "{{ item }}"
julian.gethmann's avatar
julian.gethmann committed
20 21 22 23
    dest: /etc/cups
    backup: yes
    group: lp
    owner: root
julian.gethmann's avatar
julian.gethmann committed
24 25 26 27 28 29 30
  with_items:
  - "printers.conf"
  - "cupsd.conf"
  notify: restart cups

- name: copy PPD files
  become: yes
julian.gethmann's avatar
julian.gethmann committed
31 32 33 34 35 36 37
  copy:
    src: "ppd/{{ item }}"
    dest: /etc/cups/ppd
    backup: yes
    group: root
    owner: root
    mode: 0644
julian.gethmann's avatar
julian.gethmann committed
38 39 40 41
  notify: restart cups
  with_items:
  - "HP-LaserJet-P2015-Series.ppd"
  - "Oki-MC851(PS).ppd"