Removed ppd option from cups::printer definition. Printers now default to generic postscript printer if ppd is not found from files share.
This commit is contained in:
parent
3c73e08f04
commit
df62aa4128
2 changed files with 164 additions and 8 deletions
161
cups/files/postscript.ppd
Normal file
161
cups/files/postscript.ppd
Normal file
|
@ -0,0 +1,161 @@
|
|||
*PPD-Adobe: "4.3"
|
||||
*%
|
||||
*% "$Id: postscript.ppd,v 1.1.1.1 2000/08/24 19:23:13 goffioul Exp $"
|
||||
*%
|
||||
*% Sample Postscript driver PPD file for the Common UNIX Printing
|
||||
*% System (CUPS).
|
||||
*%
|
||||
*% Michael Goffioul <goffioul@emic.ucl.ac.be>
|
||||
*%
|
||||
*FormatVersion: "4.3"
|
||||
*FileVersion: "1.1"
|
||||
*LanguageVersion: English
|
||||
*LanguageEncoding: ISOLatin1
|
||||
*PCFileName: "POSTSCRIPT.PPD"
|
||||
*Manufacturer: "Postscript"
|
||||
*Product: "(CUPS v1.1)"
|
||||
*ModelName: "Generic postscript printer"
|
||||
*ShortNickName: "Generic postscript printer"
|
||||
*NickName: "Generic postscript printer"
|
||||
*PSVersion: "(2017.000) 0"
|
||||
*LanguageLevel: "2"
|
||||
*ColorDevice: False
|
||||
*DefaultColorSpace: Gray
|
||||
*FileSystem: False
|
||||
*Throughput: "8"
|
||||
*LandscapeOrientation: Plus90
|
||||
*VariablePaperSize: False
|
||||
*TTRasterizer: Type42
|
||||
|
||||
*UIConstraints: *PageSize Executive *InputSlot Envelope
|
||||
*UIConstraints: *PageSize Letter *InputSlot Envelope
|
||||
*UIConstraints: *PageSize Legal *InputSlot Envelope
|
||||
*UIConstraints: *PageSize A4 *InputSlot Envelope
|
||||
*UIConstraints: *PageSize A5 *InputSlot Envelope
|
||||
*UIConstraints: *PageSize B5 *InputSlot Envelope
|
||||
|
||||
*OpenUI *PageSize/Media Size: PickOne
|
||||
*OrderDependency: 10 AnySetup *PageSize
|
||||
*DefaultPageSize: Letter
|
||||
*PageSize Letter/Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize Legal/Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize A5/A5: "<</PageSize[420 595]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize B5/B5 (JIS): "<</PageSize[516 729]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize EnvISOB5/Envelope B5: "<</PageSize[499 709]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize Env10/Envelope #10: "<</PageSize[297 684]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize EnvC5/Envelope C5: "<</PageSize[459 649]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize EnvDL/Envelope DL: "<</PageSize[312 624]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize EnvMonarch/Envelope Monarch: "<</PageSize[279 540]/ImagingBBox null>>setpagedevice"
|
||||
*CloseUI: *PageSize
|
||||
|
||||
*OpenUI *PageRegion: PickOne
|
||||
*OrderDependency: 10 AnySetup *PageRegion
|
||||
*DefaultPageRegion: Letter
|
||||
*PageRegion Letter/Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion Legal/Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion A5/A5: "<</PageSize[421 595]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion B5/B5 (JIS): "<</PageSize[516 729]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion EnvISOB5/Envelope B5: "<</PageSize[499 709]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion Env10/Envelope #10: "<</PageSize[297 684]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion EnvC5/Envelope C5: "<</PageSize[459 649]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion EnvDL/Envelope DL: "<</PageSize[312 624]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion EnvMonarch/Envelope Monarch: "<</PageSize[279 540]/ImagingBBox null>>setpagedevice"
|
||||
*CloseUI: *PageRegion
|
||||
|
||||
*DefaultImageableArea: Letter
|
||||
*ImageableArea Letter/US Letter: "18 36 594 756"
|
||||
*ImageableArea Legal/US Legal: "18 36 594 972"
|
||||
*ImageableArea Executive/Executive: "18 36 504 684"
|
||||
*ImageableArea A4/A4: "18 36 577 806"
|
||||
*ImageableArea A5/A5: "18 36 403 559"
|
||||
*ImageableArea B5/JIS B5: "18 36 498 693"
|
||||
*ImageableArea EnvISOB5/B5 (ISO): "18 36 463 673"
|
||||
*ImageableArea Env10/Com-10: "18 36 279 648"
|
||||
*ImageableArea EnvC5/EnvC5: "18 36 441 613"
|
||||
*ImageableArea EnvDL/EnvDL: "18 36 294 588"
|
||||
*ImageableArea EnvMonarch/Envelope Monarch: "18 36 261 504"
|
||||
|
||||
*DefaultPaperDimension: Letter
|
||||
*PaperDimension Letter/Letter: "612 792"
|
||||
*PaperDimension Legal/Legal: "612 1008"
|
||||
*PaperDimension Executive/Executive: "522 756"
|
||||
*PaperDimension A4/A4: "595 842"
|
||||
*PaperDimension A5/A5: "421 595"
|
||||
*PaperDimension B5/B5 (JIS): "516 729"
|
||||
*PaperDimension EnvISOB5/Envelope B5: "499 709"
|
||||
*PaperDimension Env10/Envelope #10: "297 684"
|
||||
*PaperDimension EnvC5/Envelope C5: "459 649"
|
||||
*PaperDimension EnvDL/Envelope DL: "312 624"
|
||||
*PaperDimension EnvMonarch/Envelope Monarch: "279 540"
|
||||
|
||||
*OpenUI *InputSlot/Media Source: PickOne
|
||||
*OrderDependency: 10 AnySetup *InputSlot
|
||||
*DefaultInputSlot: Default
|
||||
*InputSlot Default/Default: ""
|
||||
*InputSlot Tray1/Tray 1: "<</ManualFeed false /MediaPosition 3>>setpagedevice"
|
||||
*InputSlot Tray2/Tray 2: "<</ManualFeed false /MediaPosition 0>>setpagedevice"
|
||||
*InputSlot Tray3/Tray 3: "<</ManualFeed false /MediaPosition 1>>setpagedevice"
|
||||
*InputSlot Manual/Manual Feed: "<</ManualFeed true /MediaPosition 3>>setpagedevice"
|
||||
*CloseUI: *InputSlot
|
||||
|
||||
*OpenUI *Resolution/Output Resolution: PickOne
|
||||
*OrderDependency: 20 AnySetup *Resolution
|
||||
*DefaultResolution: 300dpi
|
||||
*Resolution 150dpi/150 DPI: "<</HWResolution[150 150]>>setpagedevice"
|
||||
*Resolution 300dpi/300 DPI: "<</HWResolution[300 300]>>setpagedevice"
|
||||
*Resolution 600dpi/600 DPI: "<</HWResolution[600 600]>>setpagedevice"
|
||||
*Resolution 1200dpi/1200 DPI: "<</HWResolution[1200 1200]>>setpagedevice"
|
||||
*Resolution 2400dpi/2400 DPI: "<</HWResolution[2400 2400]>>setpagedevice"
|
||||
*CloseUI: *Resolution
|
||||
|
||||
*OpenUI *Duplex/Double-Sided Printing: PickOne
|
||||
*OrderDependency: 20 AnySetup *Duplex
|
||||
*DefaultDuplex: None
|
||||
*Duplex None/Off: "<</Duplex false>>setpagedevice"
|
||||
*Duplex DuplexNoTumble/Long Edge (Standard): "<</Duplex true/Tumble false>>setpagedevice"
|
||||
*Duplex DuplexTumble/Short Edge (Flip): "<</Duplex true/Tumble true>>setpagedevice"
|
||||
*CloseUI: *Duplex
|
||||
|
||||
*DefaultFont: Courier
|
||||
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
|
||||
*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
|
||||
*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
|
||||
*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-Light: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
|
||||
*Font Courier: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-Bold: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
|
||||
*Font Helvetica: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
|
||||
*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
|
||||
*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
|
||||
*Font Symbol: Special "(001.007S)" Special ROM
|
||||
*Font Times-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
|
||||
*Font Times-Italic: Standard "(001.007S)" Standard ROM
|
||||
*Font Times-Roman: Standard "(001.007S)" Standard ROM
|
||||
*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
|
||||
*Font ZapfDingbats: Special "(001.004S)" Standard ROM
|
||||
*%
|
||||
*% End of "$Id: postscript.ppd,v 1.1.1.1 2000/08/24 19:23:13 goffioul Exp $".
|
||||
*%
|
|
@ -82,9 +82,6 @@ class cups::server inherits cups::client {
|
|||
# Printer name.
|
||||
# $uri:
|
||||
# URI to use for connecting to printer device.
|
||||
# $ppd:
|
||||
# PPD file to use for printer. If set to "auto" PPD will be copied
|
||||
# from "puppet:///files/cups/${name}.ppd".
|
||||
# $ensure:
|
||||
# If set to present printer will be installed and if set to absent
|
||||
# printer will be removed.
|
||||
|
@ -96,7 +93,7 @@ class cups::server inherits cups::client {
|
|||
# uri => "socket://hp1:9100,
|
||||
# }
|
||||
#
|
||||
define cups::printer($uri, $ensure = present, $ppd = "auto") {
|
||||
define cups::printer($uri, $ensure = present) {
|
||||
|
||||
$hostname = regsubst($uri, '^[a-z]*://(.*)[:/].*', '\1')
|
||||
$location = template("cups/printer-location.erb")
|
||||
|
@ -134,10 +131,8 @@ define cups::printer($uri, $ensure = present, $ppd = "auto") {
|
|||
|
||||
file { "/etc/cups/ppd/${name}.ppd":
|
||||
ensure => $ensure,
|
||||
source => $ppd ? {
|
||||
"auto" => "puppet:///files/cups/${name}.ppd",
|
||||
default => "${ppd}",
|
||||
},
|
||||
source => [ "puppet:///files/cups/${name}.ppd",
|
||||
"puppet:///cups/postscript.ppd" ],
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
group => root,
|
||||
|
|
Loading…
Add table
Reference in a new issue