cookbook 'cups', '= 0.11.0'
cups (11) Versions 0.11.0 Follow2
Installs/Configures cups
cookbook 'cups', '= 0.11.0', :supermarket
knife supermarket install cups
knife supermarket download cups
chef-cups
Installs the cups package, if needed, starts the cups service, and configures printers on target systems.
Attributes
cups::default
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['cups']['printers']</tt></td>
<td>array</td>
<td>List of printers to configure on the system. See example in the usage section below.</td>
<td><tt>[]</tt></td>
</tr>
<tr>
<td><tt>['cups']['systemgroups']</tt></td>
<td>string</td>
<td>Defines authorized system-group users in /etc/cups/cupsd.conf file.</td>
<td><tt>sys root</tt></td>
</tr>
<tr>
<td><tt>['cups']['share_printers']</tt></td>
<td>array</td>
<td>ACLs for printer access</td>
<td><tt>['@LOCAL']</tt></td>
</tr>
<tr>
<td><tt>['cups']['require_encryption']</tt></td>
<td>boolean</td>
<td>Should cups require SSL/TLS for client communication? This requires both <tt>['cups']['cert_file']</tt> and <tt>['cups']['key_file']</tt> to be set.</td>
<td><tt>false</tt></td>
</tr>
<tr>
<td><tt>['cups']['cert_file']</tt></td>
<td>string</td>
<td>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.</td>
<td><tt>nil</tt></td>
</tr>
<tr>
<td><tt>['cups']['key_file']</tt></td>
<td>string</td>
<td>The full path to the SSL key file to be used by cups.</td>
<td><tt>nil</tt></td>
</tr>
<tr>
<td><tt>['cups']['server_aliases']</tt></td>
<td>array</td>
<td>List of allowed domains for remote administration</td>
<td><tt>[]</tt></td>
</tr>
<tr>
<td><tt>['cups']['require_authentication']</tt></td>
<td>boolean</td>
<td>Specifies whether authentication is required to access the CUPS website and printers.</td>
<td><tt>false</tt></td>
</tr>
</table>
cups::airprint
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['cups']['airprint_generate']['git_url']</tt></td>
<td>string</td>
<td>URL to the airprint file generator repo.</td>
<td><tt>https://github.com/tjfontaine/airprint-generate.git</tt></td>
</tr>
<tr>
<td><tt>['cups']['airprint_generate']['git_revision']</tt></td>
<td>string</td>
<td>Git repo tag/version to pull.</td>
<td><tt>master</tt></td>
</tr>
</table>
cups::default_printer
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['cups']['default_printer']</tt></td>
<td>string</td>
<td>Sets the system-wide default printer.</td>
<td><tt>nil</tt></td>
</tr>
</table>
Usage
cups::default
Include cups
in your node's run_list
:
{ "name":"my_node", "run_list": [ "recipe[cups]" ] }
SAMPLE format for printer entries:
json
"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
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write you change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
License and authors
Copyright 2015-2017, Biola University
Copyright 2017, Artem Sidorenko and contributors
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.
Dependent cookbooks
git ~> 6.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Change Log
v0.11.0 (2017-06-20)
Fixed bugs:
- Fix: handle ['cups']['share_printers'] as array #20 (artem-sidorenko)
Closed issues:
Merged pull requests:
- Integration tests for airprint #30 (artem-sidorenko)
- Cleanup cups service handling #29 (artem-sidorenko)
- Do not test Ubuntu 14.04 in the CI #28 (artem-sidorenko)
- CI: ruby 2.4.1 and gem update #27 (artem-sidorenko)
- Update rubocop due to security fix #26 (artem-sidorenko)
- Fixed failing tests on Centos 7 #25 (artem-sidorenko)
- Chef 13 support #24 (artem-sidorenko)
- Updating Gems to the latest released versions #23 (artem-sidorenko)
- Updating chefspec to 5.4 #22 (artem-sidorenko)
- Improvements of intergration tests #21 (artem-sidorenko)
- Minor doc update: badges and copyright #19 (artem-sidorenko)
- Enable basic travis CI testing #18 (artem-sidorenko)
v0.10.0 (2016-04-14)
Merged pull requests:
v0.9.0 (2016-02-22)
Merged pull requests:
v0.8.0 (2016-02-19)
Merged pull requests:
v0.7.0 (2016-02-16)
Merged pull requests:
v0.6.0 (2015-06-26)
Closed issues:
- ['cups']['printers'] attribute structure #5
Merged pull requests:
v0.5.0 (2015-06-24)
Merged pull requests:
- Make access rules configurable #7 (chuhn)
- Make ports configurable #6 (chuhn)
- Extend cookbook and adapt it to Debian Jessie #4 (chuhn)
v0.4.1 (2014-12-11)
v0.4.0 (2014-12-05)
Merged pull requests:
- Add support for airprint & printer sharing to cups cookbook #1 (trinitronx)
* This Change Log was automatically generated by github_changelog_generator
Collaborator Number Metric
0.11.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.11.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
License Metric
0.11.0 passed this metric
Testing File Metric
0.11.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.11.0 passed this metric
0.11.0 failed this metric
0.11.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
License Metric
0.11.0 passed this metric
Testing File Metric
0.11.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.11.0 passed this metric
0.11.0 passed this metric
0.11.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.11.0 passed this metric
0.11.0 passed this metric