{"id":14994557,"url":"https://github.com/voxpupuli/puppet-cups","last_synced_at":"2026-02-18T22:01:15.256Z","repository":{"id":2979926,"uuid":"48058689","full_name":"voxpupuli/puppet-cups","owner":"voxpupuli","description":"Puppet module for the Common Unix Printing System (CUPS)","archived":false,"fork":false,"pushed_at":"2026-01-29T22:39:04.000Z","size":791,"stargazers_count":7,"open_issues_count":14,"forks_count":35,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-30T06:24:27.799Z","etag":null,"topics":["cups-daemon","cups-queues","cups-service","printer","printing","puppet","puppet-forge"],"latest_commit_sha":null,"homepage":"https://forge.puppetlabs.com/leoarnold/cups","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":".github/README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2015-12-15T17:32:38.000Z","updated_at":"2026-01-19T22:50:05.000Z","dependencies_parsed_at":"2025-09-04T00:18:07.733Z","dependency_job_id":"f062a500-1a40-4541-a87c-02e364ff5db8","html_url":"https://github.com/voxpupuli/puppet-cups","commit_stats":null,"previous_names":["leoarnold/puppet-cups"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/voxpupuli/puppet-cups","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cups","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cups/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cups/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cups/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-cups/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-cups/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cups-daemon","cups-queues","cups-service","printer","printing","puppet","puppet-forge"],"created_at":"2024-09-24T16:03:52.080Z","updated_at":"2026-02-18T22:01:15.244Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# The CUPS module\n\n![.github/workflows/test.yml](https://github.com/leoarnold/puppet-cups/workflows/.github/workflows/test.yml/badge.svg)\n[![Depfu](https://badges.depfu.com/badges/b664de4d78caad461da4a66da7c9efeb/overview.svg)](https://depfu.com/github/leoarnold/puppet-cups)\n[![Maintainability](https://api.codeclimate.com/v1/badges/64c46cb56b156ee464de/maintainability)](https://codeclimate.com/github/leoarnold/puppet-cups/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/64c46cb56b156ee464de/test_coverage)](https://codeclimate.com/github/leoarnold/puppet-cups/test_coverage)\n[![Documentation](http://inch-ci.org/github/leoarnold/puppet-cups.svg?branch=main)](https://leoarnold.github.io/puppet-cups)\n\n[![Puppet Forge Version](https://img.shields.io/puppetforge/v/leoarnold/cups.svg)](https://forge.puppet.com/leoarnold/cups)\n[![Puppet Forge Endorsement](http://img.shields.io/puppetforge/e/leoarnold/cups.svg)](https://forge.puppet.com/leoarnold/cups)\n[![Puppet Forge Downloads](http://img.shields.io/puppetforge/dt/leoarnold/cups.svg)](https://forge.puppet.com/leoarnold/cups)\n[![Puppet Forge Score](http://img.shields.io/puppetforge/f/leoarnold/cups.svg)](https://forge.puppet.com/leoarnold/cups)\n[![MIT License](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE.txt)\n\n## Table of Contents\n\n1. [Description](#description)\n1. [Setup](#setup)\n    * [What cups affects](#what-cups-affects)\n    * [Setup requirements](#setup-requirements)\n    * [Beginning with cups](#beginning-with-cups)\n1. [Usage - A quick start guide](#usage)\n    * [Managing printers](#managing-printers)\n    * [Managing classes](#managing-classes)\n    * [Configuring queues](#configuring-queues)\n    * [Configuring CUPS](#configuring-cups)\n    * [Automatic dependencies](#automatic-dependencies)\n    * [Using Hiera (or any other ENC)](#using-hiera)\n1. [Reference - The documentation of all features available](#reference)\n    * [Classes](#classes)\n    * [Types](#types)\n1. [Limitations](#limitations)\n    * [Evince (aka Document Viewer)](#evince-aka-document-viewer)\n    * [Option defaults](#option-defaults)\n    * [Systemd based Linux distributions](#systemd-based-linux-distributions)\n1. [Contributing - Guidelines for users and developers](#contributing)\n\n## Description\n\nThis module installs, configures, and manages the Common Unix Printing System (CUPS) service.\n\nIt provides Puppet types to install, configure, and manage CUPS printer queues and classes.\n\nKey design goals include *locale independence* and *test driven development*.\n\n## Setup\n\n### What cups affects\n\n* The CUPS packages will be installed.\n\n* The CUPS service will be enabled and launched.\n\n* The files in `/etc/cups/` will be modified using CUPS command line utilities.\n\n* The entire content of the file `/etc/cups/cupsd.conf` will be managed by the module.\n\n* The file `/etc/cups/lpoptions` will be deleted. See the section on [limitations](#option-defaults) for details.\n\n### Setup Requirements\n\nThis module is written for and tested on Linux systems with\n\n* Puppet 4, 5 or 6\n\n* CUPS `~\u003e 1.5` or `~\u003e 2.x`\n\n### Beginning with CUPS\n\nFirst you need to install this module. One way to do this is\n\n```puppet\npuppet module install leoarnold-cups\n```\n\nAll resources in this module require the CUPS daemon to be installed and configured in a certain way.\nTo ensure these preconditions you should include the main `cups` class wherever you use this module:\n\n```puppet\n# General inclusion\ninclude '::cups'\n\n# OR\n\n# Explicit class configuration\n# (May only be defined once per catalog)\nclass { '::cups':\n  # Your settings custom here\n}\n```\n\nSee the [section](#class-cups) on the `cups` class for details.\nAdding printer or class resources is described in the section on [usage](#usage).\n\n## Usage\n\nIn this section, you will learn the straightforward way to set up CUPS queues from scratch.\nIf the queues are already installed on the node, you can easily obtain a manifest with their current configuration by running\n\n  ```Text\n  puppet resource cups_queue\n  ```\n\nand adjust it following the instructions on [configuring queues](#configuring-queues).\n\n### Managing Printers\n\nThere are several ways to set up a printer queue in CUPS.\nThis section provides the minimal manifest for each method.\n\n**Note** These minimal manifests will *NOT* update or change the PPD file on already existing queues,\nas CUPS does not provide a robust way to determine how a given queue was installed.\nSee however the section on [changing the driver](#changing-the-driver) for a workaround.\n\nIf you are unsure which way to choose, we recommend to set up the printer\nusing the tools provided by your operating system (or the [CUPS web interface](http://localhost:631)),\nthen take the corresponding PPD file from `/etc/cups/ppd/` and use the `ppd` method.\n\nMinimal printer manifests:\n\n* Creating a local raw printer:\n\n  ```puppet\n  include '::cups'\n\n  cups_queue { 'MinimalRaw':\n    ensure =\u003e 'printer',\n    uri    =\u003e 'lpd://192.168.2.105/binary_p1' # Replace with your printer's URI\n  }\n  ```\n\n  To configure this queue see the section on [setting the usual options](#configuring-queues) or the `cups_queue` [type reference](#type-cups_queue).\n\n* Using a suitable model from the output of the command `lpinfo -m` on the node:\n\n  ```puppet\n  include '::cups'\n\n  cups_queue { 'MinimalModel':\n    ensure =\u003e 'printer',\n    model  =\u003e 'drv:///sample.drv/generic.ppd',\n    uri    =\u003e 'lpd://192.168.2.105/binary_p1' # Replace with your printer's URI\n  }\n  ```\n\n  To configure this queue see the section on [setting the usual options](#configuring-queues) or the `cups_queue` [type reference](#type-cups_queue).\n\n* Using a custom PPD file:\n\n  ```puppet\n  include '::cups'\n\n  cups_queue { 'MinimalPPD':\n    ensure =\u003e 'printer',\n    ppd    =\u003e '/usr/share/cups/model/myprinter.ppd',\n    uri    =\u003e 'lpd://192.168.2.105/binary_p1' # Replace with your printer's URI\n  }\n  ```\n\n  To configure this queue see the section on [setting the usual options](#configuring-queues) or the [type reference](#type-cups_queue).\n\n  In a server-agent setting, you could transfer the PPD file to the client using a `file` resource\n\n  ```puppet\n  file { '/usr/share/cups/model/myprinter.ppd':\n    ensure =\u003e 'file',\n    source =\u003e 'puppet:///modules/myModule/myprinter.ppd'\n  }\n  ```\n\n  which will automatically be required by `Cups_queue['MinimalPPD']`.\n\n#### Changing the driver\n\nWhen a printer queue is already present and managed using a PPD file,\nit is generally hard to tell which model or PPD file was used to install the queue.\nNevertheless it might become necessary to change the model or update the PPD file\n*without* changing the queue name, e.g. because the PPD file contains some login credentials.\n\nThis module introduces a way to update the driver (i.e. force a reinstall)\nthrough syncing the `make_and_model` property, which defaults to\n\n* the `NickName` (fallback `ModelName`) value from the printer's PPD file in `/etc/cups/ppd/`\n  if the printer was installed using a PPD file or a model.\n\n* `Local Raw Printer` for raw print queues.\n\n**Example:** On the node, running `puppet resource cups_queue Office` returns\n\n  ```puppet\n  cups_queue { 'Office':\n    ensure         =\u003e 'printer',\n    make_and_model =\u003e 'HP Color LaserJet 4730mfp Postscript (recommended)',\n    # ...\n  }\n  ```\n\nand you would like to\n\n* use a different model\n\n  ```Text\n  $ lpinfo -m | grep 4730mfp\n  # ...\n  drv:///hpcups.drv/hp-color_laserjet_4730mfp-pcl3.ppd HP Color LaserJet 4730mfp pcl3, hpcups 3.14.3\n  postscript-hp:0/ppd/hplip/HP/hp-color_laserjet_4730mfp-ps.ppd HP Color LaserJet 4730mfp Postscript (recommended)\n  # ...\n  ```\n\n  then you just need to adapt the manifest from above to\n\n  ```puppet\n  cups_queue { 'Office':\n    ensure         =\u003e 'printer',\n    model          =\u003e 'drv:///hpcups.drv/hp-color_laserjet_4730mfp-pcl3.ppd',\n    make_and_model =\u003e 'HP Color LaserJet 4730mfp pcl3, hpcups 3.14.3',\n    # ...\n  }\n  ```\n\n* use a custom PPD file instead which contains the line\n\n  ```Text\n  *NickName: \"HP Color LaserJet 4730mfp Postscript (MyCompany v2)\"\n  ```\n\n  then you just need to adapt the manifest from above to\n\n  ```puppet\n  cups_queue { 'Office':\n    ensure         =\u003e 'printer',\n    ppd            =\u003e '/usr/share/cups/model/hp4730v2.ppd',\n    make_and_model =\u003e 'HP Color LaserJet 4730mfp Postscript (MyCompany v2)',\n    # ...\n  }\n  ```\n\n* make it a raw queue. Then you just need to adapt the manifest from above to\n\n  ```puppet\n  cups_queue { 'Office':\n    ensure         =\u003e 'printer',\n    make_and_model =\u003e 'Local Raw Printer',\n    # ...\n  }\n  ```\n\n### Managing Classes\n\nWhen defining a printer class, it is *mandatory* to also define its member printers in the same catalog:\n\n  ```puppet\n  include '::cups'\n\n  cups_queue { 'MinimalClass':\n    ensure  =\u003e 'class',\n    members =\u003e ['Office', 'Warehouse']\n  }\n\n  cups_queue { 'Office':\n    ensure =\u003e 'printer',\n    # ...\n  }\n\n  cups_queue { 'Warehouse':\n    ensure =\u003e 'printer',\n    # ...\n  }\n  ```\n\nThe `Cups_queue['MinimalClass']` resource will automatically require its member resources `Cups_queue['Office', 'Warehouse']`.\n\n### Configuring queues\n\nOnce you have your minimal [printer](#managing-printers) or [class](#managing-classes) manifest,\nyou will need to apply some configuration.\n\n**Job handling:**\nIn CUPS, newly installed queues are disabled and rejecting by default, which can lead to confusion at times.\nThe corresponding `cups_queue` properties are:\n\n* `accepting`: Should incoming jobs be enqueued or rejected?\n\n* `enabled`: Should pending jobs be sent to the device or kept pending?\n\nIf you want your print queues to \"just work\", you should set both to `true`.\nThis module does not set default values by itself, since it might be of disadvantage in a professional copy shop environment.\n\nMost users will prefer to set both options to `true` for all queues using\n\n   ```puppet\n   Cups_queue {\n     accepting =\u003e true,\n     enabled   =\u003e true\n   }\n   ```\n\n**Option defaults:**\nSometimes you need to set some default values for CUPS or vendor options of a print queue,\ne.g. to enable Duplex to save trees or because you use A4 paper instead of US Letter.\n\nTo see all vendor options and their possible values for the queue `Office`, you can use `lpoptions`:\n\n  ```Text\n  $ lpoptions -p Office -l\n  PageSize/Media Size: *Letter Legal Executive Tabloid A3 A4 A5 B5 EnvISOB5 Env10 EnvC5 EnvDL EnvMonarch\n  InputSlot/Media Source: *Default Upper Manual\n  Duplex/2-Sided Printing: *None DuplexNoTumble DuplexTumble\n  Option1/Duplexer: *False True\n  ```\n\nThe asterisk (*) indicates the current value. Use this to adapt your manifest\n\n  ```puppet\n  cups_queue { 'Office':\n    # ...\n    options =\u003e {\n      'Duplex'   =\u003e 'DuplexNoTumble',\n      'PageSize' =\u003e 'A4',\n    }\n  }\n  ```\n\nYou only need to provide values for options you actually care about.\n\n**Access control:**\nOf course you want your boss Mr. Lumbergh, the secretary Nina and every member of the workers' council\nto be able to print to the office printer from every node. But all others should be denied to use this printer.\n\nAssuming they respectively have the user accounts `lumbergh`, `nina`, and the user group `council`,\nthis can be achieved by:\n\n  ```puppet\n  cups_queue { 'Office':\n    # ...\n    access =\u003e {\n      'policy' =\u003e 'allow',\n      'users'  =\u003e ['lumbergh', 'nina', '@council'],\n    }\n  }\n  ```\n\nNote that group names must be prefixed with an `@` sign.\n\nChanging the policy to `deny` would deny all `users`, but allow everybody else.\nFurthermore, you can unset all restrictions by using\n\n  ```puppet\n  cups_queue { 'Office':\n    # ...\n    access =\u003e {\n      'policy' =\u003e 'allow',\n      'users'  =\u003e ['all'],\n    }\n  }\n  ```\n\nbecause `all` is interpreted by CUPS as a wildcard, not as an account name.\n\n### Configuring CUPS\n\nNow that you have created manifest for all your queues, you may want to set the default destination.\n\n  ```puppet\n  class { '::cups':\n    default_queue =\u003e 'Office',\n  }\n  ```\n\nThis will require the resource `Cups_queue['Office']` to be defined in the catalog.\n\nTo find out about all options available for `Class['::cups']` see the [section below](#class-cups).\n\n### Automatic dependencies\n\nFor your convenience, this module establishes many resource dependencies automatically.\nFor example, on a Debian system the manifest\n\n```puppet\nclass { '::cups':\n  default_queue =\u003e 'Warehouse'\n}\n\ncups_queue { 'GroundFloor':\n  ensure  =\u003e 'class',\n  members =\u003e ['Office', 'Warehouse']\n}\n\ncups_queue { 'Office':\n  ensure =\u003e 'printer',\n  # ...\n}\n\ncups_queue { 'Warehouse':\n  ensure =\u003e 'printer',\n  # ...\n}\n```\n\nby default generates the dependencies\n\n```Text\n                     Class['cups']\n                    /             \\\nCups_queue['Office']               Cups_queue['Warehouse']\n                    \\             /                       \\\n               Cups_queue['GroundFloor']                   Class['cups::queues::default']\n```\n\n### Using Hiera\n\nMake sure your Puppet setup includes the `::cups` class on the relevant nodes.\nConfiguration is straightforward:\n\n```YAML\ncups::default_queue: Warehouse\ncups::web_interface: true\n```\n\nBeyond that you can also create `cups_queue` resources using Hiera. Just replace a manifest like\n\n```puppet\nclass { 'cups':\n  default_queue =\u003e 'Warehouse',\n  web_interface =\u003e true\n}\n\ncups_queue { 'MinimalClass':\n  ensure  =\u003e 'class',\n  members =\u003e ['Office', 'Warehouse']\n}\n\ncups_queue { 'Office':\n  ensure =\u003e 'printer',\n  uri    =\u003e 'socket://office.initech.com',\n}\n\ncups_queue { 'Warehouse':\n  ensure =\u003e 'printer',\n  uri    =\u003e 'socket://warehouse.initech.com',\n}\n```\n\nwith the Hiera data\n\n```YAML\ncups::default_queue: Warehouse\ncups::web_interface: true\ncups::resources:\n  GroundFloor:\n    ensure: class\n    members:\n      - Office\n      - Warehouse\n  Office:\n    ensure: printer\n    uri: socket://office.initech.com\n  Warehouse:\n    ensure: printer\n    uri: socket://warehouse.initech.com\n```\n\n## Reference\n\n### Classes\n\n* [`cups`](#class-cups)\n\n### Types\n\n* [`cups_queue`](#type-cups_queue)\n\n#### Class: `cups`\n\nInstalls, configures, and manages the CUPS service.\n\n##### Attributes\n\n* `access_log_level`: Sets the `AccessLogLevel` directive of the CUPS server.\n\n* `browse_dnssd_subtypes`: Sets the `BrowseDNSSDSubTypes` directive of the CUPS server.\n  Accepts a string or an array of supported subtypes without leading underscore, e.g. `['cups', 'print']`.\n\n* `browse_local_protocols`: Sets the `BrowseLocalProtocols` directive of the CUPS server.\n  Accepts a string or an array of supported protocols.\n\n* `browse_web_if`: Boolean value for the `BrowseWebIF` directive of the CUPS server.\n\n* `browsing`: Boolean value for the `Browsing` directive of the CUPS server. Defaults to `false`.\n\n* `default_queue`: The name of the default destination for all print jobs.\n  Requires the catalog to contain a `cups_queue` resource with the same name.\n\n* `listen`: Which addresses the CUPS daemon should listen to.\n  Accepts (an array of) strings.\n  Defaults to `['localhost:631', '/var/run/cups/cups.sock']`.\n  Note that the `cupsd.conf` directive `Port 631` is equivalent to `Listen *:631`.\n  *Warning*: For this module to work, it is *mandatory* that CUPS is listening on `localhost:631`.\n\n* `location`: Sets the access control lists for the CUPS web interface. Restricts access to localhost by default.\n  Use the presets `'share-printers`' or `'remote-admin'`\n  (inspired by the [`cupsctl`](https://www.cups.org/doc/man-cupsctl.html) commandline utility)\n  or specify the relevant endpoints directly:\n\n  ```puppet\n    class { '::cups':\n      # Unless specified here, default values will be applied for\n      # the locations '/', '/admin', '/admin/conf' and '/admin/log'\n      location =\u003e {\n        '/admin/conf' =\u003e {\n          'AuthType' =\u003e 'Default',\n          'Require'  =\u003e 'user @SYSTEM',\n          'Order'    =\u003e 'allow,deny',\n          'Allow'    =\u003e '@LOCAL'\n        }\n      }\n    }\n  ```\n\n* `log_debug_history`: Sets the `LogDebugHistory` directive of the CUPS server.\n\n* `log_level`: Sets the `LogLevel` directive of the CUPS server.\n\n* `log_time_format`: Sets the `LogTimeFormat` directive of the CUPS server.\n\n* `max_clients`: Specifies the maximum number of simultaneous clients to support.\n\n* `max_clients_per_host`: Specifies the maximum number of simultaneous clients to support from a single address.\n\n* `max_log_size`: Sets the `MaxLogSize` directive of the CUPS server.\n\n* `max_request_size`: Specifies the maximum request/file size in bytes.\n\n* `package_ensure`: Whether CUPS packages should be `present` or `absent`. Defaults to `present`.\n\n* `package_manage`: Whether to manage package installation at all. Defaults to `true`.\n\n* `package_names`: A name or an array of names of all packages needed to be installed\n  in order to run CUPS and provide `ipptool`. OS dependent defaults apply.\n\n* `page_log_format`: Sets the `PageLogFormat` directive of the CUPS server.\n\n* `papersize`: Sets the system's default `/etc/papersize`. See `man papersize` for supported values.\n\n* `purge_unmanaged_queues`: Setting `true` will remove all queues from the node\n  which do not match a `cups_queue` resource in the current catalog. Defaults to `false`.\n\n* `resources`: This attribute is intended for use with Hiera or any other ENC (see the [example above](#using-hiera)).\n\n* `server_alias`: Sets the `ServerAlias` directive of the CUPS server.\n\n* `server_name`: Sets the `ServerName` directive of the CUPS server.\n\n* `service_enable`: Whether the CUPS services should be enabled to run at boot.\n  Defaults to `true`.\n\n* `service_ensure`: Whether the CUPS services should be `running` or `stopped`.\n  Defaults to `running`.\n\n* `service_manage`:  Whether to manage services at all. Defaults to `true`.\n\n* `service_names`: A name or an array of names of all CUPS services to be managed. Defaults to `cups`.\n\n* `web_interface`:  Boolean value to enable or disable the server's web interface.\n\n#### Type: `cups_queue`\n\nInstalls and manages CUPS print queues.\n\n##### Attributes\n\n* `name`: (mandatory) Queue names may contain any printable character\n  except SPACES, TABS, (BACK)SLASHES, QUOTES, COMMAS or \"#\".\n  We recommend to use only ASCII characters because the node's shell might not support Unicode.\n\n* `ensure`: *mandatory* - Specifies whether this queue should be a `class`, a `printer` or `absent`.\n\n* `access`: Manages queue access control. Takes a hash with keys `policy` and `users`.\n  The `allow` policy restricts access to the `users` provided, while the `deny` policy\n  lets everybody submit jobs except the specified `users`.\n  The `users` are provided as a non-empty array of Unix group names (prefixed with an `@`) and Unix user names.\n\n* `accepting`: Boolean value specifying whether the queue should accept print jobs or reject them.\n\n* `description`: A short informative description of the queue.\n\n* `enabled`: Boolean value specifying whether the queue should be running or stopped.\n\n* `held`: A held queue will print all jobs in print or pending, but all new jobs will be held.\n  Setting `false` will release them.\n\n* `location`: A short information where to find the hard copies.\n\n* `options`: A hash of options (as keys) and their target value. Almost every option you can set with\n  `lpadmin -p [queue_name] -o key=value` is supported here. Use `puppet resource cups_queue [queue_name]`\n  on the node for a list of all supported options for the given queue, and `lpoptions -p [queue_name] -l`\n  to see a list of available values for the most commonly used printer specific options.\n\n* `shared`: Boolean value specifying whether to share this queue on the network.\n\n##### Class-only attributes\n\n* `members`: *mandatory* - A non-empty array with the names of CUPS queues.\n  The class will be synced to contain only these members in the given order.\n  If the catalog contains `cups_queue` resources for these queues, they will be required automatically.\n\n##### Printers-only attributes\n\n* `make_and_model`: This value is used for [driver updates and changes](#changing-the-driver).\n  Matches the `NickName` (fallback `ModelName`) value from the printer's PPD file\n  if the printer was installed using a PPD file or a model,\n  and `Local System V Printer` or `Local Raw Printer` otherwise.\n\n* `model`: A supported printer model. Use `lpinfo -m` on the node to list all models available.\n\n* `ppd`: The absolute path to a PPD file on the node.\n  If the catalog contains a `file` resource with this path as title, it will automatically be required.\n  The recommended location for your PPD files is `/usr/share/cups/model/` or `/usr/local/share/cups/model/`.\n\n* `uri`: The device URI of the printer. Use `lpinfo -v` on the node to scan for printer URIs.\n\n## Limitations\n\n### Evince (aka Document Viewer)\n\nSetting `papersize =\u003e 'a4'` only modifies `/etc/papersize`,\nbut [Evince](https://wiki.gnome.org/Apps/Evince) uses\nthe environment variable `LC_PAPER` to determine your preferred paper size,\nas [Patrick Min](http://www.patrickmin.com/linux/tip.php?name=evince_default_paper_size) figured out.\n\nOn Debian and Ubuntu, you can set a global default value for `LC_PAPER` using the manifest\n\n```puppet\naugeas { 'papersize':\n  context =\u003e '/files/etc/default/locale',\n  changes =\u003e 'set LC_PAPER \\'\"es_ES.UTF-8\"\\'' # Change to your locale\n}\n```\n\n### Option defaults\n\nSometimes it may be necessary to modify the default values for some queue options to ensure an intuitive user experience,\ne.g. to enable the use of an optional duplex unit.\nFor historic reasons there are two ways to set default values for all users:\n\n* Daemon defaults are set using `sudo lpadmin` and will affect all jobs from both local and remote hosts.\n  The CUPS daemon saves them frequently - but not immediately - to `/etc/cups/classes.conf`,\n  `/etc/cups/printers.conf`, and the PPD files in `/etc/cups/ppd/`.\n\n* Local defaults are set using `sudo lpoptions` and will only affect jobs from the local host,\n  *overriding* the daemon defaults for these jobs. The values are saved to the file `/etc/cups/lpoptions`.\n\nHence there is no robust way to determine the current daemon defaults when used in conjunction with local defaults.\nIf local defaults aren't used, the command `lpoptions -p [queue_name] -l` will return the daemon defaults.\n\nIn order to provide a stable and idempotent way for Puppet to set default option values for all jobs sent to a queue,\nthis module will *disable* the use of local defaults by deleting the file `/etc/cups/lpoptions`.\n\n### Systemd based Linux distributions\n\nOn some systemd based Linux distributions the Puppet run fails because\nduring service restart systemd would prematurely yield back control to\nPuppet which would then fail to install print queues.\n\nYou can deal with this by installing the Puppet systemd module\n\n```shell\npuppet module install camptocamp-systemd\n```\n\nand then include a workaround class in your catalog\n\n```puppet\ninclude '::cups::workarounds::systemd_service_restart'\n```\n\nwhich makes the `cups.socket` unit wait for CUPS to listen on `localhost:631`\nbefore systemd yields back control.\n\nIf you want to add the `ListenStream` to a different systemd unit,\nyou can include\n\n```puppet\nclass { '::cups::workarounds::systemd_service_restart':\n  unit =\u003e 'mycups.socket'\n}\n```\n\n## Contributing\n\nThere are several ways to contribute for both users and developers:\n\n* If you like this module, please show your appreciation by giving it a\n  [positive rating](https://forge.puppet.com/leoarnold/cups) in the Puppet Forge\n  and spreading the news in your favorite way.\n\n* Want to suggesting a new feature, point out a flaw in the documentation or report a bug?\n  Please open a [GitHub issue](https://github.com/leoarnold/puppet-cups/issues)\n  using the suggested skeleton from the [contribution guidelines](CONTRIBUTING.md).\n\n* Developers might want to submit a [GitHub pull request](https://github.com/leoarnold/puppet-cups/pulls).\n  It is highly recommended to open an **issue first** and discuss changes with the maintainer.\n  See the [contribution guidelines](CONTRIBUTING.md) for our quality standards and legal requirements.\n\n_Thank you for your interest in the CUPS module_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-cups","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-cups","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-cups/lists"}