Code Monkey home page Code Monkey logo

chef-cups's Introduction

cups Cookbook

Installs the cups package, if needed, starts the cups service, and configures printers on target systems.

Attributes

cups::default

Key Type Description Default
['cups']['printers'] array List of printers to configure on the system. See example in the usage section below. []
['cups']['systemgroups'] string Defines authorized system-group users in /etc/cups/cupsd.conf file. sys root
['cups']['share_printers'] boolean Should cups share printers? true
['cups']['require_encryption'] boolean Should cups require SSL/TLS for client communication? This requires both ['cups']['cert_file'] and ['cups']['key_file'] to be set. false
['cups']['cert_file'] string The full path to the SSL certificate file to be used by cups. **Note:** if an intermediate certificate is required by the issuing certificate authority, the intermediate certificate must be appended to the server certificate file as cups does not support separate intermediate and certificate files. nil
['cups']['key_file'] string The full path to the SSL key file to be used by cups. nil
['cups']['server_aliases'] array List of allowed domains for remote administration []
['cups']['require_authentication'] boolean Specifies whether authentication is required to access the CUPS website and printers. false

cups::airprint

Key Type Description Default
['cups']['airprint_generate']['git_url'] string URL to the airprint file generator repo. https://github.com/tjfontaine/airprint-generate.git
['cups']['airprint_generate']['git_revision'] string Git repo tag/version to pull. master

cups::default_printer

Key Type Description Default
['cups']['default_printer'] string Sets the system-wide default printer. nil

Usage

cups::default

Include cups in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[cups]"
  ]
}

SAMPLE format for printer entries:

"cups": {
  "printers": [
    {
      "printer1": {
        "uri": "lpd://FQDN",
        "desc": "HP LaserJet xx",
        "model": "textonly.ppd",    #textonly.ppd is set as the default by the recipe.
        "location": "Front Office"
      }
    },
    {
      "printer2": {
        "uri": "lpd://xxx.xxx.xxx.xxx"
      }
    },
    {
      "printer3": {
        "uri": "lpd://myprinter.mydomain"
      }
    }
  ]
}
Data bags

Set the attribute node['cups']['printer_bag'] to the name of your data bag.

Data bag entries use this format:

{
  "id": "printer1",
  "model": "textonly.ppd",
  "uri": "lpd://FQDN",
  "location": "Front Office",
  "desc": "HP LaserJet xx"
}

cups::airprint

Configures CUPS to advertise printers via AirPrint.

cups::default_printer

Sets the system-wide default printer (via the node['cups']['default_printer'] attribute).

CAUTION -- in its current form, this will completely overwrite the /etc/cups/lpoptions file.

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Copyright 2015, Biola University

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

chef-cups's People

Contributors

chuhn avatar fcoelho avatar mcm-ham avatar trinitronx avatar troyready avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.