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:
Timo Mkinen 2009-10-22 11:22:52 +03:00
parent 3c73e08f04
commit df62aa4128
2 changed files with 164 additions and 8 deletions

View file

@ -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,