-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic stubs for cups_options provider
- Loading branch information
mosen
committed
Feb 16, 2012
1 parent
629f6cf
commit bfb884a
Showing
4 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,65 @@ | ||
CUPS support for puppet | ||
----------------------- | ||
======================= | ||
|
||
Initially will be developed to support Mac OS X printer management on the | ||
client. | ||
*IN DEVELOPMENT* | ||
|
||
This module/resource aims to provide support for management of the CUPS printing system. | ||
|
||
Primarily it will be used to add and remove printers from client machines running the Mac OS X operating system, | ||
although it should be generic enough to use with any linux/bsd variety with CUPS installed. | ||
|
||
It may eventually be used to manage permissions and options for the cups daemon. | ||
|
||
|
||
Facter Facts | ||
============ | ||
|
||
A list of facter facts provided by the module. | ||
|
||
printers | ||
-------- | ||
|
||
Provides a list of installed printers. | ||
|
||
|
||
Resource Types | ||
============== | ||
|
||
A list of resource types provided by the module. | ||
|
||
printer | ||
------- | ||
|
||
The printer resource type is used to add and remove printers from a puppet node. | ||
|
||
__Example__ | ||
|
||
``` | ||
# Printer resource sample : all parameters listed (except for ppd options, which depend on the ppd). | ||
printer { "Printer_A": | ||
ensure => present, | ||
uri => "lpd://localhost/printer_a", | ||
description => "This is the printer description", | ||
location => "Main office", | ||
ppd => "/Library/Printers/PPDs/Printer.ppd", | ||
enabled => true, # Enabled by default | ||
shared => false, # Disabled by default | ||
options => [], # Not yet supported: array of PPD options | ||
} | ||
``` | ||
|
||
printer_defaults | ||
---------------- | ||
|
||
The printer defaults resource type is used to define default options for the CUPS printing system. | ||
|
||
__Example__ | ||
|
||
|
||
``` | ||
printer_defaults { "media": | ||
ensure => present, | ||
value => "A4", | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Puppet::Type.type(:printer_defaults).provide :cups_options, :parent => Puppet::Provider do | ||
desc "This provider manages default printer options using CUPS command line tools" | ||
|
||
commands :lpoptions => "/usr/bin/lpoptions" | ||
commands :lpinfo => "/usr/sbin/lpinfo" | ||
|
||
def create | ||
|
||
end | ||
|
||
def destroy | ||
|
||
end | ||
|
||
def exists? | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters