mosen/puppet-cups

Printers are recreated on each run as long as the options variable are passed.

Closed this issue · 2 comments

When doing a puppetrun, the module does Notice me about changes even if there is none. This happens only when the options hash is passed in.

Ok (options array is commented out):

printer { "Basic_Printer":
ensure => present,
name => "pullprintricoh_ps",
uri => "lpd://pullprint.domain/pullprintricoh_ps",
location => "Ricoh PS on campus",
description => "This is the printer description",
ppd => "/usr/share/ppd/pullprintricoh_ps.ppd",
shared => false,
enabled => true,
#options => { media => 'A4', duplex => 'DuplexNoTumble' },
}

Not Ok:

printer { "Basic_Printer":
ensure => present,
name => "pullprintricoh_ps",
uri => "lpd://pullprint.domain/pullprintricoh_ps",
location => "Ricoh PS on campus",
description => "This is the printer description",
ppd => "/usr/share/ppd/pullprintricoh_ps.ppd",
shared => false,
enabled => true,
options => { media => 'A4', duplex => 'DuplexNoTumble' },
}

Notice: /Stage[main]/App::Print::Precise/Printer[Basic_Printer]/options: options changed

Quick update:

This issue pops up at least with the folling version:

3ff4f78

more testing is done, and it seems like a user (and documentation :) problem.

Reading the sourcecode onec again yields that the correct way to set media and duplex is like this:

printer { "Basic_Printer":
ensure => present,
name => "pullprintricoh_ps",
uri => "lpd://pullprint.domain/pullprintricoh_ps",
location => "Ricoh PS on campus",
description => "This is the printer description",
ppd => "/usr/share/ppd/pullprintricoh_ps.ppd",
shared => false,
enabled => true,
#options => { media => 'A4', duplex => 'DuplexNoTumble' },
duplex => 'DuplexNoTumble',
page_size => 'A3'
}

that is, not through the options array.

the color_mode => 'Grey' does not work though. But thats probably another issue, not related to this one.

so, now I can set the options I want, not using the options array. So the problem is solved. I dont know if other options should be set through the options array though. That need some more testing.