cups.yml 631 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
  dnf: name=cups state=installed
julian.gethmann's avatar
julian.gethmann committed
5 6 7 8
  when: ansible_distribution == 'Fedora'

- name: install CUPS
  become: yes
julian.gethmann's avatar
julian.gethmann committed
9
  apt: name=cups state=installed
julian.gethmann's avatar
julian.gethmann committed
10 11 12 13 14 15 16 17 18 19 20 21
  when: ansible_distribution == 'Ubuntu'

- name: copy CUPS' configs
  become: yes
  copy: src={{ item }} dest=/etc/cups backup=yes group=lp owner=root
  with_items:
  - "printers.conf"
  - "cupsd.conf"
  notify: restart cups

- name: copy PPD files
  become: yes
julian.gethmann's avatar
julian.gethmann committed
22
  copy: src=ppd/{{ item }} dest=/etc/cups/ppd backup=yes group=root owner=root mode=0644
julian.gethmann's avatar
julian.gethmann committed
23 24 25 26
  notify: restart cups
  with_items:
  - "HP-LaserJet-P2015-Series.ppd"
  - "Oki-MC851(PS).ppd"