HP41.cups

Ansible Role: CUPS

Build Status

Overview

This role installs CUPS (Common Unix Printing System), sets up the necessary drivers (PPDs), and configures printers and classes in CUPS.

What It Does

  • Installs cups and cups-pdf.
  • Users listed in cups_lpadmin_users will be added to the lpadmin group, giving them administrative access to CUPS.
  • Installs cups-lpd based on specific variables:
    • Creates a user for the cups-lpd process.
    • Installs xinetd to manage cups-lpd as a service using a template file.
  • Configures CUPS:
    • If provided, it will build and copy configuration templates for cupsd.conf, cups-browsed.conf, and snmp.conf.
    • If SSL certificates are provided, it will copy them to the correct location.

Installing PPDs

  • Creates the folder /opt/share/ppd for PPD files.
  • Adds the OpenPrinting repository.
  • Installs the Ricoh OpenPrinting Package (openprinting-ppds-postscript-ricoh) and unzips the PPDs.
  • Installs HPLIP (HP Linux Imaging and Printing), including a proprietary plugin.
  • Copies specified PPDs from a designated folder to /opt/share/ppd.

Managing Printers

  • Removes any printers that are set to be deleted first.
  • Installs the printers and classes defined in the variables cups_printer_list and cups_class_list.

Requirements

  • Ansible version 2.1 or higher.
  • Supported guest machines include Debian (stretch, jessie, wheezy) and Ubuntu (xenial, trusty, precise).

Additional Tasks Outside This Role's Scope

  • Opening required CUPS ports (515, 631, 9100) in the firewall.
    • You can modify cups__debops_ferm_dependent_rules (in defaults) if using debops.ferm for firewall management.

Default Variables

These variables can be changed or used as-is:

Installation and Configuration

  • cups_lpadmin_users: Users to add to the CUPS admin group (default is root).
  • cups_lpd: To install and configure cups-lpd (default is True).
  • cups_sysadmins_email: Email for the cupsd.conf template (default is sysadmins@ansible_fqdn).
  • Various settings for firewall rules and xinetd configurations.

PPD Installation

  • cups_ppd_files_to_be_copied: Source folder for .ppd files (default is none).
  • cups_hplip: Install HPLIP (default is True).
  • cups_ricoh_openprinting: Install Ricoh drivers/PPDs (default is True).
  • Settings related to OpenPrinting repository.

Printer and Class Installation

  • cups_printer_list: A list of printers with the necessary info for installation.
  • cups_class_list: A list of classes with the necessary info for installation.
  • Flags to control printer sharing and how to handle missing attributes.

General Role Operations

  • cups_packages_to_install: Packages to install (default is cups, cups-pdf).
  • Various paths and permissions for CUPS configuration files.
  • Temporary location for scripts (/tmp/cups-ansible).

This role simplifies the installation and configuration of printing services on Unix-like systems using Ansible, making printer management easier for system administrators.

Informazioni sul progetto

Installs CUPS, installs necessary PPDs and installs printers and classes on CUPS

Installa
ansible-galaxy install HP41.cups
Licenza
mit
Download
1.7k
Proprietario