---
- name: install printing packages
  when: mtype != 'media'
  become: true
  pacman:
    name:
      - ghostscript
      - cups
      - cups-pdf
      - gutenprint
      - foomatic-db
      - foomatic-db-engine
      - foomatic-db-nonfree
      - foomatic-db-gutenprint-ppds
      - foomatic-db-nonfree-ppds
      - foomatic-db-ppds
      - hplip
      - splix

- name: install network printing packages
  when: mtype != 'media'
  become: true
  pacman:
    name:
      - avahi
      - samba

- name: enable printing services
  when: mtype != 'media'
  become: true
  systemd: name={{ item }} enabled=yes
  loop:
    - cups.service
    - avahi-daemon.service

---
- name: install printing packages
  when: mtype != 'media'
  become: true
  pacman:
    name:
      - ghostscript
      - cups
      - cups-pdf
      - gutenprint
      - foomatic-db
      - foomatic-db-engine
      - foomatic-db-nonfree
      - foomatic-db-gutenprint-ppds
      - foomatic-db-nonfree-ppds
      - foomatic-db-ppds
      - hplip
      - splix

- name: install drivers from aur
  when: mtype != 'media'
  aur:
    name:
      - epson-inkjet-printer-escpr

- name: install network printing packages
  when: mtype != 'media'
  become: true
  pacman:
    name:
      - avahi
      - samba

- name: enable printing services
  when: mtype != 'media'
  become: true
  systemd: name={{ item }} enabled=yes
  loop:
    - cups.service
    - avahi-daemon.service

Install printer drivers from aur
Install printer drivers from aur
